-
Notifications
You must be signed in to change notification settings - Fork 25
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
Item typing not exported in TS declaration file #35
Comments
I'm no expert on TypeScript typings, so I can't really say for sure what the fix is. @septs Can you have a look at this? |
@mrjpierce first, this package not is esmodule Line 402 in 8bd7810
@rubenv the issue require use esmodule written this package WARNING: This needs to break the API backwards compatibility see https://www.typescriptlang.org/docs/handbook/modules.html#export--and-import--require |
About get type Item = InstanceType<typeof PO["Item"]> See https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#conditional-types |
type Item = typeof PO["Item"]["prototype"]; This seems to work for now 👍. Xièxiè |
@rubenv The issue closable |
@septs thanks! |
@rubenv I want to rewrite this codebase using TypeScript. |
@septs Could you elaborate a bit on why and how you'd want to do this? Keep in mind that this is a project I consider "finished": no big new functionality is needed (it does what it needs to do) and we can't break API / backwards compatibilty. Rewrites are always risky. I'm all for strongly typing things, but it can only be done incrementally and in an extremely careful way: no user should ever see their code break. |
Currently running into this problem after last release:
Probably going to have the same issue with the Header type
The text was updated successfully, but these errors were encountered: