Suggestion Backlog Slog, 3/6/2017
RyanCavanaugh opened this issue · 1 comments
RyanCavanaugh commented
- #4639
inttypes - #13455 Allow attaching a comment before all non-user injected code.
- #12936 Exact Types
- #11774 Distinguish declaration file and js file when the option “Keep comments in TypeScript compiler output" is turned on
- #13231 [Proposal] External Module Type
- #2607 Generic decorators - could they receive some default type arguments?
- #13020
tsc -wshould clear screen before each run - #14301 Allow
extendsfromany(Salsa) - #14249 Constraint
Partial<T>/Readonly<T>toT extends object - #14150
strictVarianceChecksflag - #13890
JSX.ElementTypeto define the type of<Tag />expressions - #13847 Enforce generator functions to contain at least one
yield - #12825 Generalize handling of
neverforreturns - #12600 Discriminated unions of non-unit-type-discriminated unions
- #12410 Allow operator
+onstring|number-constrainedT?
RyanCavanaugh commented
- #4639
inttypes- Just not all that useful
- ES is looking at adding
int64 - Revisit but 👎 unless we do Web Assembly
- #13455 Allow attaching a comment before all non-user injected code.
- When exactly would we emit this line?
- Always? Only when we emit a new branch ?
- Do our helpers suffer from this?
- Where does this happen?
- Can you just regex the output?
- We could use a helper instead (
makeSuper(_super, this)) - AMF
- When exactly would we emit this line?
- #13721 Pure annotation for class emit
- Needed for accurate tree shaking
- Somewhat odd Uglify doesn't identify this by itself?
- Would be emitted for classes without static initializers
- Could be implemented by an emit transform pipeline
- But doesn't solve
tscscenarios - Probably OK
- Actually this doesn't work bescause the injection has to happen between the class emit and the IIFE emit
- But doesn't solve
- Punt to uglififer to detect this pattern instead?
- Make loaders handle this instead?
- Daniel will try to do this for WebPack
- #12936 Exact Types
- Excess property checks are already pretty good
- Which types are exact and which aren't?
- People may disagree
- Some APIs really are closed
- Sidebar on all-optional interfaces
- Ryan should implement this and stop complaining
- What is the behavior of this for unions / intersections?
- Intersection... makes no sense?
- Violates basic assumptions of assignability (
T & Uassignable toT)
- Violates basic assumptions of assignability (
- Intersection... makes no sense?
- What does it mean to be constrained by an exact type?
- What about instantations of exact types?
- Danger of bug farm
- What is the value add here?
- What about creating automatically-disjointing unions?
- Outcomes
- Need specific scenarios - is this an XY problem solution?
- We need to fix excess property checking when the target is a union type
- #13020
tsc -wshould clear screen before each run- Universal acclaim in the room for this behavior
- 👍
- Sidenote: Accept PR to get rid of WScript host
- #14301 Allow
extendsfromany(Salsa)- 👍
- When this happens, add a
[s: string]: anysignature to the type
- #14249 Constrain
Partial<T>/Readonly<T>toT extends object- For shallow variants only
- Breaking change...
- 👎 Annoying as hell and delivers no value
- #14150
strictVarianceChecksflag- Highly infectious
- Could anyone actually get this to work?
- You actually can't do this without the entire set of C++-like
constconstructs
- Keep tabs on this
- Highly infectious
- #12825 Generalize handling of
neverforreturns- The control flow graph is formed during binding, but we don't have type data yet
- We could store all calls at each flow control point and then check them for
neverreturns and check this info for computing types- Expensive!
- Correct analysis would require multiple iterations
- Possible solutions?
- At bind-time
- Detect explicit
: neverfunctions- Or do this at parse time?
- Store potential calls to these
- Detect explicit
- Use this to set up a "better" flow control graph
- Above doesn't really work due to imported identifiers...
- At bind-time
- No clear answers in sight
Cut for time
- #13890
JSX.ElementTypeto define the type of<Tag />expressions - #13847 Enforce generator functions to contain at least one
yield - #12600 Discriminated unions of non-unit-type-discriminated unions
- #12410 Allow operator
+onstring|number-constrainedT? - #13231 [Proposal] External Module Type
- #2607 Generic decorators - could they receive some default type arguments?
- #11774 Distinguish declaration file and js file when the option “Keep comments in TypeScript compiler output" is turned on