Skip to content

Spread operator in tuple types not supported #59

@anion155

Description

@anion155

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/[email protected][email protected]/node_modules/rollup-plugin-dts/dist/rollup-plugin-dts.js:700:19)
at DeclarationScope.convertTypeNode (./node_modules/.registry.npmjs.org/rollup-plugin-dts/[email protected][email protected]/node_modules/rollup-plugin-dts/dist/rollup-plugin-dts.js:646:22)
at DeclarationScope.convertTypeParameters (./node_modules/.registry.npmjs.org/rollup-plugin-dts/[email protected][email protected]/node_modules/rollup-plugin-dts/dist/rollup-plugin-dts.js:617:18)
at Transformer.convertTypeAliasDeclaration (./node_modules/.registry.npmjs.org/rollup-plugin-dts/[email protected][email protected]/node_modules/rollup-plugin-dts/dist/rollup-plugin-dts.js:988:37)
at Transformer.convertStatement (./node_modules/.registry.npmjs.org/rollup-plugin-dts/[email protected][email protected]/node_modules/rollup-plugin-dts/dist/rollup-plugin-dts.js:914:25)
at new Transformer (./node_modules/.registry.npmjs.org/rollup-plugin-dts/[email protected][email protected]/node_modules/rollup-plugin-dts/dist/rollup-plugin-dts.js:849:18)
at transformFile (./node_modules/.registry.npmjs.org/rollup-plugin-dts/[email protected][email protected]/node_modules/rollup-plugin-dts/dist/rollup-plugin-dts.js:1115:29)
at Object.load (./node_modules/.registry.npmjs.org/rollup-plugin-dts/[email protected][email protected]/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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions