You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can reproduce this issue when running this plugin on its own. Other plugins, such as node-resolve are known to cause issues.
I am running this plugin on .d.ts files generated by TypeScript. The plugin can consume .ts and even .js files (with allowJs: true), but this is known to cause issues.
This issue is not related to rolling up @types. The plugin ignores these by default, unless respectExternal is set. @types can contain hand-crafted code which is known to cause issues.
To reproduce that error, I changed ./build/src/index.ts.
// Your code that is causing problems.import{PluginImpl}from"rollup";importtsfrom"typescript";exportclassMyClassextendsnull{statica=10;}exportinterfaceOptions{/** * The plugin will by default flag *all* external libraries as `external`, * and thus prevent them from be bundled. * If you set the `respectExternal` option to `true`, the plugin will not do * any default classification, but rather use the `external` option as * configured via rollup. */respectExternal?: boolean;/** * In case you want to use TypeScript path-mapping feature, using the * `baseUrl` and `paths` properties, you can pass in `compilerOptions`. */compilerOptions?: ts.CompilerOptions;}declareconstplugin: PluginImpl<Options>;exportdefaultplugin;
Error Message
Change the ./build/src/index.ts and run command npm run build.
// The Error Message thrown by rollup / the plugin.
./.build/src/index.js → ./dist/rollup-plugin-dts.mjs, ./dist/rollup-plugin-dts.cjs...
created ./dist/rollup-plugin-dts.mjs, ./dist/rollup-plugin-dts.cjs in 188ms
./.build/src/index.d.ts → ./dist/rollup-plugin-dts.d.ts...
[!] (plugin dts) Error: Syntax not yet supported
2 | import ts from "typescript";
3 |
> 4 | declare class MyClass extends null {
| ^^^^
5 | static a = 10;
6 | }
7 | interface Options {
.build/src/index.d.ts
Error: Syntax not yet supported
2 | import ts from "typescript";
3 |
> 4 | declare class MyClass extends null {
| ^^^^
5 | static a = 10;
6 | }
7 | interface Options {
at convertExpression (/home/ubuntu/github-clone/test/rollup-plugin-dts/.build/rollup.config.js:451:15)
at DeclarationScope.convertHeritageClauses (/home/ubuntu/github-clone/test/rollup-plugin-dts/.build/rollup.config.js:920:36)
at Transformer.convertClassOrInterfaceDeclaration (/home/ubuntu/github-clone/test/rollup-plugin-dts/.build/rollup.config.js:1279:15)
at Transformer.convertStatement (/home/ubuntu/github-clone/test/rollup-plugin-dts/.build/rollup.config.js:1215:25)
at new Transformer (/home/ubuntu/github-clone/test/rollup-plugin-dts/.build/rollup.config.js:1166:18)
at convert (/home/ubuntu/github-clone/test/rollup-plugin-dts/.build/rollup.config.js:1157:25)
at Object.transform (/home/ubuntu/github-clone/test/rollup-plugin-dts/.build/rollup.config.js:1473:31)
at transformFile (/home/ubuntu/github-clone/test/rollup-plugin-dts/.build/rollup.config.js:1571:50)
at Object.transform (/home/ubuntu/github-clone/test/rollup-plugin-dts/.build/rollup.config.js:1578:33)
at /home/ubuntu/github-clone/test/rollup-plugin-dts/node_modules/rollup/dist/shared/rollup.js:22706:25
The text was updated successfully, but these errors were encountered:
Checklist
Other plugins, such as
node-resolve
are known to cause issues..d.ts
files generated by TypeScript.The plugin can consume
.ts
and even.js
files (withallowJs: true
), but this is known to cause issues.@types
.The plugin ignores these by default, unless
respectExternal
is set.@types
can contain hand-crafted code which is known to cause issues.I got error when I use
extends null
.egoist/tsup#500
Code Snipped
To reproduce that error, I changed
./build/src/index.ts
.Error Message
Change the
./build/src/index.ts
and run commandnpm run build
.The text was updated successfully, but these errors were encountered: