-
Notifications
You must be signed in to change notification settings - Fork 58
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
createContext
return type is any
#71
Comments
any
createContext
return type is any
Interesting... I wonder if this use-context-selector/src/index.ts Line 110 in 9e5174e
Happy to see anyone has any suggestions. |
@heyitsarpit are you using typescript or just the vscode intellisense? |
The codebase is typescript, the screenshot I posted are vscode's on hover type inspection. |
This might be a bug in TypeScript (from the code path which shows the hover information), can you make a repro that works in the TypeScript playground? |
@orta The issue is a year old and I just checked and don't observer this behaviour anymore. Things working as expected. I guess we can close the issue. |
So this doesn't seem to be an issue with the library(maybe), but the returned type for
createContext
isany
when I hover over it VSCode, but if I try writing something with it, the autocomplete correctly completes the fields.Looking at the type definition in the
node_modules
, and it looks correct to me.The weirdest thing is if I hover over
Context.Provider
, it shows the correct type.The text was updated successfully, but these errors were encountered: