Skip to content

fix: update typings for useContext to be callable#90

Merged
frandiox merged 1 commit intofrandiox:masterfrom
thyb:fix/useContext-typings
Oct 5, 2022
Merged

fix: update typings for useContext to be callable#90
frandiox merged 1 commit intofrandiox:masterfrom
thyb:fix/useContext-typings

Conversation

@thyb
Copy link

@thyb thyb commented Jul 5, 2022

Hello,

There is a Typescript definition issue when using: const { request } = useContext(). We get the following error:

This expression is not callable.
  Type 'Omit<SharedContext, "request" | "response">' has no call signatures.

This small PR fix this error by making useContext callable.

Copy link
Owner

@frandiox frandiox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@frandiox frandiox merged commit 9e7e9fa into frandiox:master Oct 5, 2022
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.

2 participants