-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScript
Milestone
Description
TypeScript Version: 3.4.0-dev.201xxxxx
Search Terms:
Code
file: src/compiler/transformers/declarations.ts
function visitDeclarationSubtree(input: Node): VisitResult<Node> {
if (shouldStripInternal(input)) return;
if (isDeclaration(input)) {
if (isDeclarationAndNotVisible(input)) return;
if (hasDynamicName(input) && !resolver.isLateBound(getParseTreeNode(input) as Declaration)) {
return;
}
}
// Elide implementation signatures from overload sets
if (isFunctionLike(input) && resolver.isImplementationOfOverload(input)) return;
// Elide semicolon class statements
if (isSemicolonClassElement(input)) return;
let previousEnclosingDeclaration: typeof enclosingDeclaration;
if (isEnclosingDeclaration(input)) {
previousEnclosingDeclaration = enclosingDeclaration;
enclosingDeclaration = input as Declaration;
}
const oldDiag = getSymbolAccessibilityDiagnostic;
// Emit methods which are private as properties with no type information
if (isMethodDeclaration(input) || isMethodSignature(input)) {
if (hasModifier(input, ModifierFlags.Private)) {
if (input.symbol && input.symbol.declarations && input.symbol.declarations[0] !== input) return; // Elide all but the first overload
// !!!! here, cleanup will use canProdiceDiagnostic, but canProdiceDiagnostic not defined
return cleanup(createProperty(/*decorators*/undefined, ensureModifiers(input), input.name, /*questionToken*/ undefined, /*type*/ undefined, /*initializer*/ undefined));
}
}
const canProdiceDiagnostic = canProduceDiagnostics(input);
if (canProdiceDiagnostic && !suppressNewDiagnosticContexts) {
getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(input as DeclarationDiagnosticProducing);
}
Gulp, Webpack, etc.Expected behavior:
Actual behavior:
Playground Link:
Related Issues:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScript