Skip to content
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: fix type narrowing for document-related hooks #11

Merged
merged 3 commits into from
Dec 16, 2024

Conversation

achou11
Copy link
Member

@achou11 achou11 commented Dec 16, 2024

Fixes #5

gmaclennan and others added 3 commits December 13, 2024 15:59
As far as I know, TS cannot infer the return types because it does not support dependent types, so we need to explicitly define the return type, and cast the type of the return value, because TS is unable to narrow the type within the body of the function.
@achou11 achou11 merged commit 631ceb8 into main Dec 16, 2024
3 checks passed
@achou11 achou11 deleted the chore/doc-return-types branch December 16, 2024 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix type narrowing of document-related hooks
2 participants