Skip to content

Commit

Permalink
fix(typescript): fix plugin type declarations (#647)
Browse files Browse the repository at this point in the history
We fix the type declaration file for the `typescript` plugin.

Signed-off-by: Thomas Scholtes <thomas-scholtes@gmx.de>
  • Loading branch information
Thomas Scholtes committed Jan 29, 2021
1 parent d9fb47d commit 181b929
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/typescript/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export interface RollupTypescriptPluginOptions {
transformers?: CustomTransformerFactories;
}

type ElementType<T extends Array<any>> = T extends (infer U)[] ? U : never;
type ElementType<T extends Array<any> | undefined> = T extends (infer U)[] ? U : never;

export type TransformerStage = keyof CustomTransformers;
type StagedTransformerFactory<T extends TransformerStage> = ElementType<CustomTransformers[T]>;
Expand Down

0 comments on commit 181b929

Please sign in to comment.