Closed wiresnchains closed 1 month ago
It seems that placing semicolons after classes & class methods is the issue.
I am not sure - can you provide an MWE?
The parsing is done by TypeScript - so as long as TS does not crash we don't have an issue here ;). What we need is a full reproducible incl. the version of TS that you use. In general unknown tokens from TS can cause issues which is why the TS version matters to have a good reproducible.
It's not a major issue, just something I've been using for my old codebase that was crashing.
class Demo {
private x: number;
private y: number;
constructor(x: number, y: number) {
this.x = x;
this.y = y;
}; // placing a semicolon here crashed the declaration compiler
public getSum() {
return this.x + this.y;
}; // here also
}
export { Demo };
Thanks for the report. I think I can reproduce it. A fix should be out soon.
Out in 0.16.1.
Running the following CLI command:
dets src/index.ts --name foo --files src/**/*.ts --out dist/index.d.ts
Results in the terminal terminating with code 1My index exports 2 classes from other files, that have a class set as a default export.