Skip to content

Commit

Permalink
Revert "Bind typedef/enum on all assignment decl kinds (#33240)"
Browse files Browse the repository at this point in the history
This reverts commit b542bdf.
  • Loading branch information
sandersn committed Sep 5, 2019
1 parent b3ec4ed commit e50e01f
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 84 deletions.
18 changes: 1 addition & 17 deletions src/compiler/binder.ts
Expand Up @@ -1827,23 +1827,7 @@ namespace ts {
bindPotentiallyMissingNamespaces(file.symbol, declName.parent, isTopLevel,
!!findAncestor(declName, d => isPropertyAccessExpression(d) && d.name.escapedText === "prototype"), /*containerIsClass*/ false);
const oldContainer = container;
switch (getAssignmentDeclarationPropertyAccessKind(declName.parent)) {
case AssignmentDeclarationKind.ExportsProperty:
case AssignmentDeclarationKind.ModuleExports:
container = file;
break;
case AssignmentDeclarationKind.ThisProperty:
container = declName.parent.expression;
break;
case AssignmentDeclarationKind.PrototypeProperty:
container = (declName.parent.expression as PropertyAccessExpression).name;
break;
case AssignmentDeclarationKind.Property:
container = isPropertyAccessExpression(declName.parent.expression) ? declName.parent.expression.name : declName.parent.expression;
break;
case AssignmentDeclarationKind.None:
return Debug.fail("Shouldn't have detected typedef or enum on non-assignment declaration");
}
container = isPropertyAccessExpression(declName.parent.expression) ? declName.parent.expression.name : declName.parent.expression;
declareModuleMember(typeAlias, SymbolFlags.TypeAlias, SymbolFlags.TypeAliasExcludes);
container = oldContainer;
}
Expand Down
15 changes: 0 additions & 15 deletions tests/baselines/reference/enumTagOnExports.symbols

This file was deleted.

19 changes: 0 additions & 19 deletions tests/baselines/reference/enumTagOnExports.types

This file was deleted.

7 changes: 0 additions & 7 deletions tests/baselines/reference/enumTagOnExports2.symbols

This file was deleted.

9 changes: 0 additions & 9 deletions tests/baselines/reference/enumTagOnExports2.types

This file was deleted.

10 changes: 0 additions & 10 deletions tests/cases/conformance/jsdoc/enumTagOnExports.ts

This file was deleted.

7 changes: 0 additions & 7 deletions tests/cases/conformance/jsdoc/enumTagOnExports2.ts

This file was deleted.

0 comments on commit e50e01f

Please sign in to comment.