File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -1527,16 +1527,18 @@ export class Program extends DiagnosticEmitter {
15271527 ) : void {
15281528 var name = declaration . name . text ;
15291529 var validDecorators = DecoratorFlags . NONE ;
1530- if ( ! declaration . is ( CommonFlags . AMBIENT ) ) {
1530+ if ( declaration . is ( CommonFlags . AMBIENT ) ) {
1531+ validDecorators |= DecoratorFlags . EXTERNAL ;
1532+ } else {
15311533 validDecorators |= DecoratorFlags . INLINE ;
15321534 }
1533- if ( parent . kind != ElementKind . CLASS_PROTOTYPE && ! declaration . is ( CommonFlags . INSTANCE ) ) {
1534- validDecorators |= DecoratorFlags . GLOBAL ;
1535+ if ( ! declaration . is ( CommonFlags . INSTANCE ) ) {
1536+ if ( parent . kind != ElementKind . CLASS_PROTOTYPE ) {
1537+ validDecorators |= DecoratorFlags . GLOBAL ;
1538+ }
15351539 }
15361540 if ( ! declaration . is ( CommonFlags . GENERIC ) ) {
1537- if ( declaration . is ( CommonFlags . AMBIENT ) ) {
1538- validDecorators |= DecoratorFlags . EXTERNAL ;
1539- } else if ( parent . kind == ElementKind . FILE && ( < File > parent ) . source . isEntry ) {
1541+ if ( parent . kind == ElementKind . FILE && ( < File > parent ) . source . isEntry ) {
15401542 validDecorators |= DecoratorFlags . START ;
15411543 }
15421544 }
You can’t perform that action at this time.
0 commit comments