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

Docs: type 'unknown' missing from 'Everydad Types' #3060

Open
rajinder-yadav opened this issue Apr 13, 2024 · 1 comment
Open

Docs: type 'unknown' missing from 'Everydad Types' #3060

rajinder-yadav opened this issue Apr 13, 2024 · 1 comment

Comments

@rajinder-yadav
Copy link

Can someone please add the definition of the 'unknown' type and clearly describe the purpose of it, and how is differs from the type 'any'.

Sample coding show proper use of 'unknown' as well as the context to use it over 'any' would also be benificial.

@natepmay
Copy link

natepmay commented Oct 4, 2024

This explanation/distinction is given in the "More on Functions" chapter of the handbook: https://www.typescriptlang.org/docs/handbook/2/functions.html#unknown

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

No branches or pull requests

2 participants