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 {
1527
1527
) : void {
1528
1528
var name = declaration . name . text ;
1529
1529
var validDecorators = DecoratorFlags . NONE ;
1530
- if ( ! declaration . is ( CommonFlags . AMBIENT ) ) {
1530
+ if ( declaration . is ( CommonFlags . AMBIENT ) ) {
1531
+ validDecorators |= DecoratorFlags . EXTERNAL ;
1532
+ } else {
1531
1533
validDecorators |= DecoratorFlags . INLINE ;
1532
1534
}
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
+ }
1535
1539
}
1536
1540
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 ) {
1540
1542
validDecorators |= DecoratorFlags . START ;
1541
1543
}
1542
1544
}
You can’t perform that action at this time.
0 commit comments