-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Design Meeting Notes, 11/13/2020 #41538
Comments
It would really make my day to get rid of all the type assertions required to use If performance is the main issue, could we have an opt-in {
"lib": [
"DOM",
"DOM.Iterable",
"DOM.FancyTypes",
]
} |
That's what you had in the meeting notice as the topic as well, but instead we talked about class static index signatures. It's probably a good idea to update the header to match. |
Done, thanks for the catch! |
@danvk - the lib option isn't too valuable (it basically leaves it the same as it is now, because there are npm modules which augment the definition and both are sort of manual opt-in) - we'd need it to be default to affect JS users |
abstract
Constructors#36392
abstract
if you're extending from a value with anabstract
constructor - but you do if it's a generic bounded to a type with an `abstract constructor.Yadda
must be declared abstract because it doesn't implementxyz
.abstract
.InstanceType
doesn't work onabstract
types.InstanceType
thing seems like a clear scenario.Middle Spreads in Tuples
We used to normalize in the presence of spreads not in the middle and just turn all subsequent elements into a single rest element with all types unioned.
[number, ...string[], number]
->[number, ...(string | number)[]]
Is also an error when explicitly written.
Idea: preserve these spreads in the middle.
This also means you can encode parameter lists with a fixed set of trailing elements, and a rest element at the beginning.
Was this doable today?
Motivating scenarios?
Does TypeScript know how to get the "last" element?
foo[foo.length - 1]
Will put out a PR for this.
Static Index Signatures
#37797
Function.prototype
?Object
has the same issues.Better Types for
querySelector
#29037
querySelector
is used all the time when writing any sort of DOM code.,
.d.ts
files.CustomElements
?Array.prototype.flat()
.The text was updated successfully, but these errors were encountered: