Open liuseen-l opened 1 year ago
@liuseen-l Following the README.md:
While this plugin is fairly complete, it does not support all imaginable use-cases. In particular, the plugin works best with already existing .d.ts files generated by the typescript compiler from idiomatic code.
Working with .ts(x) or even .js(x) (when setting allowJs: true) does work, but is not recommended.
I've got it working by adding this as an additional step in rollup:
export default [
{
input: "./src/index.ts",
plugins: [
typescript(...), // tsconfig outputs type declarations to `/types`
...
],
output: [...],
},
{
input: "./dist/types/index.d.ts",
output: [{ file: "dist/index.d.ts", format: "es" }],
plugins: [dts()],
},
];
the compoents/index.d.ts is lost
the nova/index.ts
the components/index.ts
and the nova/index.d.ts is not right?