-
-
Notifications
You must be signed in to change notification settings - Fork 25
TypeScript Guidelines - Types: Inference, Annotations, Assertions, Escape Hatches #74
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
Conversation
f8d8310
to
ecf59b1
Compare
infer
, :
, as
, any
)8c2fbe0
to
b4511bc
Compare
d5c1704
to
c5a59b8
Compare
c5a59b8
to
b9644ca
Compare
adbe5ca
to
513a52a
Compare
4c8fb5c
to
44d575c
Compare
44d575c
to
39795dc
Compare
69a0989
to
b1385fc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of good stuff to chew on here! I skimmed through it one more time. This gets me thinking that it may be valuable to have two different kinds of documents in the future, one that's purely "do"s and "don't"s, and another that is a bit more expositional. We can decide on that in the future though. Nice work!
Motivation
In order to improve type safety and maintainability, we need to establish clear guidelines regarding how to apply types: specifically, when and when not to use explicit type declarations or keywords such as
as
,any
.Explanation
The merge conflicts with main will be resolved after the review process to avoid noisy diffs.Table of Contents
:
,satisfies
)as
,!
)any
,@ts-expect-error
)Details
References
any
,as
usage in TypeScript Guidelines doc #47