We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 261a09a commit 05ba3dbCopy full SHA for 05ba3db
typescript-json-schema.ts
@@ -837,7 +837,6 @@ export class JsonSchemaGenerator {
837
public getMainFileSymbols(program: ts.Program): string[] {
838
const files = program.getSourceFiles().filter(file => !file.isDeclarationFile);
839
if (files.length) {
840
- const mainFile = files[0];
841
return Object.keys(this.userSymbols).filter((key) => {
842
const symbol = this.userSymbols[key].getSymbol();
843
if (!symbol || !symbol.declarations || !symbol.declarations.length) {
@@ -847,7 +846,7 @@ export class JsonSchemaGenerator {
847
846
while (node && node.parent) {
848
node = node.parent;
849
}
850
- return node === mainFile;
+ return files.indexOf(node.getSourceFile()) > -1;
851
});
852
853
return [];
0 commit comments