Skip to content

Commit

Permalink
Remove useless Model
Browse files Browse the repository at this point in the history
  • Loading branch information
cromoteca committed Sep 22, 2023
1 parent 0a30872 commit f2dee2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/ts/generator-typescript-plugin-subtypes/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ export default class SubTypesPlugin extends Plugin {
});
}
});

const unionFn = `${convertFullyQualifiedNameToRelativePath(baseKey)}Union.ts`;
const unionSource = sources.find(({ fileName }) => fileName === unionFn)!;
sources.splice(sources.indexOf(unionSource), 1);
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('SubTypesPlugin', () => {
const generator = createGenerator([BackbonePlugin, ModelPlugin, SubTypesPlugin]);
const input = await loadInput(sectionName, import.meta.url);
const files = await generator.process(input);
expect(files.length).to.equal(11);
expect(files.length).to.equal(10);

const t = await files[1].text();
expect(t).to.exist;
Expand Down

0 comments on commit f2dee2d

Please sign in to comment.