Repository navigation
Suggestion Backlog Slog, 8/6/2018 #26241
Copy link
Copy link
Closed
Labels
Design NotesNotes from our design meetingsNotes from our design meetings
Description
Activity
RyanCavanaugh commented
on Aug 6, 2018 MemberAuthorMore actions- Proposal: Variadic Kinds -- Give specific types to variadic functions #5453 Variadic kinds
- Currently we allow you to capture tuples in variadic rest positions
- But the tuples themselves cannot contain rests
- This would allow deconstruction of tuples
- What functions would be typable with this that currently aren't?
- Promisify
- Should we close holes that allow people to write trivial turing machines in the type system?
- ??
- Disallow expressions of type
voidto be used in truthiness checks #26234 Disallow testingvoidexprs- Breaking change
- All goodness
- Found bugs in us and VS Code
- Found "type errors" in a couple other projects
- out of range index in a tuple magically works #5203 OOB on tuples should be errors
- 👍
- Polymorphic "this" for static members #5863 Polymorphic
this- Static inheritance in signatures is plainly unsound
- So calls to the polymorphic
thisare right out - Isn't what people want just the non-signature side?
- Do people want instance-
thisor static-this? - Representation vs checking
- Discuss soundness
- T[K] should be never when T is never #23005
T[K]should benever- 👍
- Using string enum as key in {[key]: Type} throws not an index signature #22892 String enums should be indexed types
- Our dot behavior makes this a bad idea
- Abstract classes that implement interfaces shouldn't require method signatures #22815 Interface members in abstract classes
- Should we copy them automatically?
- It's presumably what you want
- What happens to optional members?
- They become... abstract optional? What is that even?
- How do you not-implement an optional abstract member?
- Need to avoid hop-skip-jump problem
- They become... abstract optional? What is that even?
- Post some questions on this
- Should we copy them automatically?
- Casting to Partial<x> seems to be errorful #22806
Partial<T>should be weak?- It is
- Weak checking applies to assignability, not comparability
- WIA
- parameter initializer is bound to the wrong variable #22769 Parameter initializers
- Allow in ES6, error in downlevel only
- Typing number of children in TSX #22759 Allow tuples in JSX children
- 👍
- Bitwise enum initializer: compile-time constant but not allowed as a type reference? #22709 Enum literals
- There are actually many kinds of enums under the hood
- Union enums only get created when only bare literals (or nothing) are initializers
- These kinds of enums behave differently
- You might want one or the other and this is how you choose
- WIA; would be a BC
- Any number can be assigned to enum member type #22311 Out-of-range enum assignment
- Back compat problem
- Not really a trap
- Problem for e.g. mod flags
- Maybe disallow in strict
- Allow bitwise test on
undefined#22230 undefined/null in&/|- 👎
- "...args: infer" on an overloaded function chooses only one function head #26136 Inference of unions from argument lists
- Would this imply filtering if you weren't capturing the whole argument list?
- No (spreading back would be a nightmare)
- Proposal: Variadic Kinds -- Give specific types to variadic functions #5453 Variadic kinds
WIA
Wounded in action?
EDIT: It suddenly occurs to me that this is probably "Works As Intended" as acronymized by Yoda. nmv...
Reacted by Mariusz Pawelski and Ryan CavanaughRyanCavanaugh commented
on Aug 7, 2018 MemberAuthorMore actionsWell, it's accepted
Wondering if actionable
We're imitating ActionScriptReacted by Joe Calzaretta, Jessica Franco, Wenlu Wang, Sean M. Vieira, kiara, Cerber-Ursi, Trotyl Yu and c69- addedDesign NotesNotes from our design meetingsNotes from our design meetings
on Aug 13, 2018
Metadata
Metadata
Assignees
Labels
Design NotesNotes from our design meetingsNotes from our design meetings
voidto be used in truthiness checks #26234 Disallow truthy checks of voidthisT[K]should beneverwhenKisneverstringenumobject should be indexable typeesModuleInteropshould work whentarget=esnextPartial<T>should be a weak typeFunction#bindinfervariable in scope in false arm of conditional typetypeof(expression) operandsstringbehave poorly #22509 Something something mapped typesundefined#22230 Allow implicitundefined->0coercion understrictNullChecksfor bitwise opsfilesarray