Repository navigation
Suggestion Backlog Slog, 4/24/2017 #15356
Copy link
Copy link
Closed
Labels
Design NotesNotes from our design meetingsNotes from our design meetings
Description
Activity
- addedDesign NotesNotes from our design meetingsNotes from our design meetings
on Apr 24, 2017 RyanCavanaugh commented
on Apr 24, 2017 MemberAuthorMore actions- Allow to call getter/setter logic When subclassing #338 Allow super.get/set
- 👎 not enough demand, too complex of code to gen, and can't be statically checked for correctness
- Suggestion: Allow declaring class members within a constructor #766 Allow declaring class members in the constructor
- Field initializers are coming
- Quick fixes are here
- 👎
- Should unions and non-primitives be allowed for relational comparisons? #5156 > operator and friends on union types
- Turns out this was fixed
- 👍
- Inherited typing for class property initializers #10570 Inherited typing for class property initializers
- We gotta do something
- Also affects string literals from the base type
- Why not copy down the type blindly?
- Back-compat break
class Animal { me = new Animal(); move() { } } class Dog extends Animal { me = new Dog(); woof() { this.me.woof(); // Should be OK } }
* Who should we break? * Ryan is happy to break contravariant writes * Investigate more- Cannot Optionalize Class Getters #14417 Optional getters in classes
- Why?
- Why did we allow it for methods?
- It was a bug (?)
- Is there a way to make the desired snippet compile?
- No
- Are we OK with that?
- ... it's weird, in both directions
- Why do you want to do this?
- Accepting PRs if this wasn't just an idle curiousity
- Why?
- Suggestions for misspelled properties and variables (based on Levenshtein distance for variables/properties in scope) #15333 Suggest closely-named identifiers
- 👍 with a quickfix
- Assign to Nathan so he can pick the best algorithm
- NaN, Infinity and -Infinity not accepted in number literal types #15135 NaN/Infinity/-Infinity numeric literals
- These are not unit values (there are "more than one" NaN, Infinity, etc)
- What is even for?
- Who would write
Math.sign(NaN)?
- Who would write
- 👎 Too Complex / scenarios not well-defined
- Suggestion: one-sided or fine-grained type guards #15048 Non-exhaustive type guards
- More user-side complexity than compiler-side
isNumber(x): x extends number?- May be hard to explain which to use
- But you already have to understand this to decide if
x is Tis OK or not
- But you already have to understand this to decide if
- AMF, gather more use cases
- Allow to call getter/setter logic When subclassing #338 Allow super.get/set
- locked and limited conversation to collaborators
on Jun 14, 2018
Metadata
Metadata
Assignees
Labels
Design NotesNotes from our design meetingsNotes from our design meetings
unknown: less-permissive alternative toany#10715 unknown alternative to any