Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spread operator in tuple types not supported #59

Closed
anion155 opened this issue Oct 3, 2019 · 0 comments
Closed

Spread operator in tuple types not supported #59

anion155 opened this issue Oct 3, 2019 · 0 comments

Comments

@anion155
Copy link
Contributor

anion155 commented Oct 3, 2019

HI! Thanks for the module.

But it's still does not supports spread in tuple type am I right? microsoft/TypeScript#24897

roolup-plugin-dts: 1.1.8
typescript: 3.6.3
pnpm: 3.8.1

Error message:

[!] (plugin dts) Error: Could not load ./packages/lib-draw/build/utils/TypedEventEmitter.d.ts (imported by ./packages/lib-draw/build/Client.d.ts): Syntax not yet supported
1 | import { EventEmitter } from 'events';
> 2 | declare type Constructor<T = any, As extends [...any[]] = [...any[]], St = {}> = {
|                                               ^^^^^^^^
3 |     new (...args: As): T;
4 | } & Pick<St, keyof St>;
5 | declare type Arguments<T> = T extends (...args: any) => any ? Parameters<T> : T extends new (...args: any) => any ? ConstructorParameters<T> : any[];
Error: Could not load ./packages/lib-draw/build/utils/TypedEventEmitter.d.ts (imported by ./packages/lib-draw/build/Client.d.ts): Syntax not yet supported
1 | import { EventEmitter } from 'events';
> 2 | declare type Constructor<T = any, As extends [...any[]] = [...any[]], St = {}> = {
|                                               ^^^^^^^^
3 |     new (...args: As): T;
4 | } & Pick<St, keyof St>;
5 | declare type Arguments<T> = T extends (...args: any) => any ? Parameters<T> : T extends new (...args: any) => any ? ConstructorParameters<T> : any[];
at DeclarationScope.convertTypeNode (./node_modules/.registry.npmjs.org/rollup-plugin-dts/1.1.8_rollup@1.22.0+typescript@3.6.3/node_modules/rollup-plugin-dts/dist/rollup-plugin-dts.js:700:19)
at DeclarationScope.convertTypeNode (./node_modules/.registry.npmjs.org/rollup-plugin-dts/1.1.8_rollup@1.22.0+typescript@3.6.3/node_modules/rollup-plugin-dts/dist/rollup-plugin-dts.js:646:22)
at DeclarationScope.convertTypeParameters (./node_modules/.registry.npmjs.org/rollup-plugin-dts/1.1.8_rollup@1.22.0+typescript@3.6.3/node_modules/rollup-plugin-dts/dist/rollup-plugin-dts.js:617:18)
at Transformer.convertTypeAliasDeclaration (./node_modules/.registry.npmjs.org/rollup-plugin-dts/1.1.8_rollup@1.22.0+typescript@3.6.3/node_modules/rollup-plugin-dts/dist/rollup-plugin-dts.js:988:37)
at Transformer.convertStatement (./node_modules/.registry.npmjs.org/rollup-plugin-dts/1.1.8_rollup@1.22.0+typescript@3.6.3/node_modules/rollup-plugin-dts/dist/rollup-plugin-dts.js:914:25)
at new Transformer (./node_modules/.registry.npmjs.org/rollup-plugin-dts/1.1.8_rollup@1.22.0+typescript@3.6.3/node_modules/rollup-plugin-dts/dist/rollup-plugin-dts.js:849:18)
at transformFile (./node_modules/.registry.npmjs.org/rollup-plugin-dts/1.1.8_rollup@1.22.0+typescript@3.6.3/node_modules/rollup-plugin-dts/dist/rollup-plugin-dts.js:1115:29)
at Object.load (./node_modules/.registry.npmjs.org/rollup-plugin-dts/1.1.8_rollup@1.22.0+typescript@3.6.3/node_modules/rollup-plugin-dts/dist/rollup-plugin-dts.js:1146:33)
at Promise.resolve.then (./node_modules/.registry.npmjs.org/rollup/1.22.0/node_modules/rollup/dist/rollup.js:16616:25)
Swatinem pushed a commit that referenced this issue Oct 3, 2019
+ add test for tuple type spread operator
@anion155 anion155 closed this as completed Oct 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant