Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit de6d5bb

Browse files
committed
Parser: fixed issue where some things happened before all source files had been fully parsed
1 parent c419959 commit de6d5bb

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

source/parser.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,16 @@ class TS2ASParser
142142
{
143143
this._currentFileIsExternal = index !== (this._sourceFiles.length - 1);
144144
this.populateInheritance(sourceFile);
145+
});
146+
this._sourceFiles.forEach((sourceFile, index) =>
147+
{
148+
this._currentFileIsExternal = index !== (this._sourceFiles.length - 1);
145149
this.populatePackageLevelDefinitions(sourceFile);
146-
this.promoteInterfaces();
147-
this.cleanupStaticSideDefinitions();
148-
this.cleanupMembersWithForceStaticFlag();
149-
this.makeInternalReturnTypesPublic();
150150
});
151+
this.promoteInterfaces();
152+
this.cleanupStaticSideDefinitions();
153+
this.cleanupMembersWithForceStaticFlag();
154+
this.makeInternalReturnTypesPublic();
151155
this.cleanupBuiltInTypes();
152156
return { definitions: this._definitions, hasNoDefaultLib: referencedFileIsStandardLib };
153157
}

0 commit comments

Comments
 (0)