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
fix(typescript): add missing imports #633
Conversation
This imports fail the build right now, and I checked the types with TypeScript 3.9 and 4.0 and they still work.
The second issue is here: type ElementType<T extends Array<any>> = T extends (infer U)[] ? U : never;
^^^^^^^^^^
type StagedTransformerFactory<T extends TransformerStage> = ElementType<CustomTransformers[T]>;
^^^^^^^^^^^^^^^^^^^^^ Because as every property of And therefore the type tries to assign There are two possible fixes, but I am (semantically) not sure, which one is the better fit. Solution 1: allow undefined in
|
If somebody can give me feedback on the question in #633 (comment), I can add it (and we can get this merged) |
@apfelbox I'm probably not as learned as you with TS, but could using |
@shellscape I don't think that that would work. That is the main problem, actually: as they are optional, the type of the index access in |
@shellscape yes, I the meantime #647 popped up and seems to be fixing the same issues. |
Rollup Plugin Name: TypeScript
This PR contains:
Are tests included?
Breaking Changes?
I have no idea how to test this, as we would need to run the build with both versions of TypeScript and I don't know if sth like this is already set up for this repository).
List any relevant issue numbers:
Description
These two imports were missing and fail the TypeScript build of the Typescript rollup plugin with TypeScript 4.0+
Not sure if they failed for ^3.9 as well.
I tested this change with both TypeScript 3.9.7 and 4.0.5 and it works.
Doesn't seem to fix the last issue of #626 though.