mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Merge pull request #12247 from Microsoft/fix10840
Fix missing alias for decorated classes in es5
This commit is contained in:
@@ -9936,8 +9936,7 @@ namespace ts {
|
||||
// Due to the emit for class decorators, any reference to the class from inside of the class body
|
||||
// must instead be rewritten to point to a temporary variable to avoid issues with the double-bind
|
||||
// behavior of class names in ES6.
|
||||
if (languageVersion === ScriptTarget.ES2015
|
||||
&& declaration.kind === SyntaxKind.ClassDeclaration
|
||||
if (declaration.kind === SyntaxKind.ClassDeclaration
|
||||
&& nodeIsDecorated(declaration)) {
|
||||
let container = getContainingClass(node);
|
||||
while (container !== undefined) {
|
||||
|
||||
Reference in New Issue
Block a user