-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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, 10/2/2020 #40969
Comments
/cc @saschanaz who I expect would be interested in dom discussions above |
Emitting multiple files per IDL itself should be doable, but not sure about how the packages could be versioned. Also what would happen when:
Setting correct dependencies will also be important as IDLs does not have import statements, but theoretically it should be doable too. |
I think microsoft/TypeScript-DOM-lib-generator#915 is the best solution for this. BCD tracks how many browsers have adopted features so we can use their data.
Not sure this is a problem. In 2020 we generally get a spec first and then a feature, so I think it's not really an issue. |
Consistent Union Type Sorting
(sometimes referred to as "deterministic")
1 | 2
gets printed back as2 | 1
because the numeric literal type2
gets created first!What goes in lib.dom.d.ts, exactly?
https://github.com/microsoft/TypeScript-DOM-lib-generator#what-are-the-typescript-teams-heuristics-for-prs-to-the-dom-apis
lib.dom.d.ts
, but we want to limitlib.dom.d.ts
to features that are broadly implemented and stable.lib.dom.d.ts
consumers..d.ts
file from each of these.lib.dom.d.ts
, but let people opt in individually?lib.dom.d.ts
, or grab the individual declarations from@types
.@types/dom
@types
.lib.dom.actuallyhtml5.d.ts
(exaggerated name),lib.dom.stable.d.ts
, and then loop them all together inlib.dom.d.ts
.lib.dom.d.ts
to have all the stuff - lots of web developers need to be careful to be maximally compatible. Want to know when browser X implements stuff, browser Y doesn't. Testing only in browser X reinforces this.@types
, consider the same here.Getting TSServer Working in WebWorkers
#39656
sys
for these files.void
Properties are Optional#38479
Not type-safe to make
value
optional onIteratorResult<T>
.Tried to add a conditional that checked if
T
wasvoid
, then made it optional.Tried something else, broke almost nothing:
void
makes properties optional.void
means "I won't witness this."Some argue this should be illegal.
void
in a return type only allowsundefined
or no explicit return value.Otherwise,
void
is "I will not witness this value"void
needs to have consistent behavior between generators yield values and return values.But is consistency on this point more important than usefulness?
What's the difference between
void
andunknown
?void | Promise<void>
- kind of like hacky negated typesPromise
or something you should really never look at, but is not aPromise
.We need a consistent viewpoint on what
void
is.Another option:
undefined
makes things optionalvoid
should be switched out withundefined
in implementations.unknown
in declarations for callback return positionRelevant:
missing
Conclusion:
The text was updated successfully, but these errors were encountered: