-
Notifications
You must be signed in to change notification settings - Fork 1k
Type error fixes #1436
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
base: main
Are you sure you want to change the base?
Type error fixes #1436
Conversation
merged latest
merged latest
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! thanks ✅
just a minor nit + comments
*/ | ||
// @ts-expect-error The type of this method is not compatible with the one | ||
// in the base class. It might be a good idea to fix this. | ||
// @ts-expect-error The type of this method is not compatible with the one in the base class. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah thanks! Probably why it wasn't being registered correctly.
"noEmit": false, | ||
"emitDeclarationOnly": true | ||
"emitDeclarationOnly": true, | ||
"esModuleInterop": true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this do (specifically needed for this PR)? 👀 https://www.typescriptlang.org/tsconfig/#esModuleInterop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got an error file investigation this issue:
../types/utils/image.d.ts:140:8 - error TS1259: Module '"/path/transformers.js/node_modules/sharp/lib/index"' can only be default-imported using the 'esModuleInterop' flag
140 import sharp from 'sharp';
The problem is that sharp is using commonJS (require). This will ensure that interop between CommonJS ed es modules works better. As far as I know it doesn't affect runtime behavior. It only helps TypeScript understand CommonJS modules better during type checking and generation.
.gitignore
Outdated
.DS_STORE | ||
deno.lock | ||
.idea | ||
demo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
demo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. I removed it.
The following errors from #1409 are adressed by this PR:
Closes #1337
Closes #1409