We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Effective TypeScript: Use typed identity functions to guide type inference
https://effectivetypescript.com/2020/06/16/typed-identity-functions/
The text was updated successfully, but these errors were encountered:
While the tuple helper still has its place, TypeScript 4.9's satisfies operator has made the last two examples obsolete.
tuple
satisfies
Instead of withValueType<T>, you can use satisfies Record<string, T>:
withValueType<T>
satisfies Record<string, T>
const capitals = { ny: [-73.7562, 42.6526], ca: [-121.4944, 38.5816], ak: [-134.4197, 58.3019], } satisfies Record<string, Point>;
Instead of withValueTypesFrom, you can use satisfies Partial<T>: This doesn't quite do the same thing!
withValueTypesFrom
satisfies Partial<T>
Progress!
Sorry, something went wrong.
No branches or pull requests
Use typed identity functions to guide type inference
Effective TypeScript: Use typed identity functions to guide type inference
https://effectivetypescript.com/2020/06/16/typed-identity-functions/
The text was updated successfully, but these errors were encountered: