-
Notifications
You must be signed in to change notification settings - Fork 71
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
Declaration is missing imported type when using pnpm
?
#330
Comments
Thanks for providing a minimal repro! That is a strange output error... DTS generation is done entirely by the TS Does this code type-check with A workaround I might suggest is to use |
Is there a type-error or does it type-check fine? I'm also curious if |
Oh, I'm correcting my story. Exporting
|
Also seems a bit reminiscent of #274 (which has a workaround: #274 (comment)), as well as jaredpalmer/tsdx#967 (which also uses |
First: declare twice include is doesn't work typescript({
useTsconfigDeclarationDir: true,
clean: true,
// verbosity: 3,
check: true, // FIXED: https://github.com/ezolenko/rollup-plugin-typescript2/issues/234
tsconfig: path.resolve(__dirname, 'tsconfig.json'),
tsconfigOverride: {
compilerOptions: {
declaration: true,
rootDir: path.resolve(__dirname),
},
include: [path.resolve(__dirname, 'src')],
},
include: [path.resolve(__dirname, 'src')],
}), And I don't understand the other issues clearly.. :( |
Should be fine without arguments given your
If you mean that That being said, looking at your type-errors, this might be "correct" behavior as the
Given this error, it sounds like either Vue or its typings couldn't be found / resolved. Which would explain why Normally, the module and its typings are found in
Thanks for checking this!
No worries -- they're more a note to me and other maintainers of similar issues encountered, which could be useful for figuring out the root cause. In this case, the use of Let me investigate this a bit more. I'd like to see how NPM vs. PNPM usage may differ, some |
Ok, I did a quick look and was able to get So now can confirm that this is not an upstream TS issue, and has to do with how I'll see if I can figure anything out in this minimal repro and will respond here if I can, but going to close this as a duplicate as such. |
pnpm
?
Worked through your reproduction (and the source code of the TS compiler) and managed to find a fix for this long-standing issue with See #332 . I actually tested it locally against your repro and confirmed that there was no type-error anymore (so Thanks for the very minimal repro again -- really shows the value of MCVEs! 🙂 Once that's merged and released, this should be fixed. I'll update here when it's released. |
Released in 0.32.0 🎉 |
Thank you very much!!! 😊 |
…n rollup bundle This commit fixes typechecking in rollup bundle while using pnpm. More info about the issue ezolenko/rollup-plugin-typescript2#330
…n rollup bundle This commit fixes typechecking in rollup bundle while using pnpm. More info about the issue ezolenko/rollup-plugin-typescript2#330
What happens and why it is wrong
When i want to using api-extractor to genderation my d.ts file, i found an error :
InternalError: Internal Error: Unable to follow symbol for "Ref"
In the source code, I imported type. And then it lost in my rollup output code.
source code
I think there should be something like this in the output code:
import { Ref } from 'vue'
, but it didn't.What should I do about it? Thanks.
Environment
Versions
:rollup.config.js
:tsconfig.json
:package.json
plugin output with verbosity 3
:The text was updated successfully, but these errors were encountered: