microsoft/TypeScript

Suggestion Backlog Slog, 3/6/2017

RyanCavanaugh opened this issue · 1 comments

  • #4639 int types
  • #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 -w should clear screen before each run
  • #14301 Allow extends from any (Salsa)
  • #14249 Constraint Partial<T>/Readonly<T> to T extends object
  • #14150 strictVarianceChecks flag
  • #13890 JSX.ElementType to define the type of <Tag /> expressions
  • #13847 Enforce generator functions to contain at least one yield
  • #12825 Generalize handling of never for returns
  • #12600 Discriminated unions of non-unit-type-discriminated unions
  • #12410 Allow operator + on string|number-constrained T ?
  • #4639 int types
    • 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
  • #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 tsc scenarios
      • Probably OK
      • Actually this doesn't work bescause the injection has to happen between the class emit and the IIFE emit
    • 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 & U assignable to T)
    • 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 -w should clear screen before each run
    • Universal acclaim in the room for this behavior
    • 👍
    • Sidenote: Accept PR to get rid of WScript host
  • #14301 Allow extends from any (Salsa)
    • 👍
    • When this happens, add a [s: string]: any signature to the type
  • #14249 Constrain Partial<T>/Readonly<T> to T extends object
    • For shallow variants only
    • Breaking change...
    • 👎 Annoying as hell and delivers no value
  • #14150 strictVarianceChecks flag
    • Highly infectious
      • Could anyone actually get this to work?
      • You actually can't do this without the entire set of C++-like const constructs
    • Keep tabs on this
  • #12825 Generalize handling of never for returns
    • 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 never returns and check this info for computing types
      • Expensive!
    • Correct analysis would require multiple iterations
    • Possible solutions?
      • At bind-time
        • Detect explicit : never functions
          • Or do this at parse time?
        • Store potential calls to these
      • Use this to set up a "better" flow control graph
      • Above doesn't really work due to imported identifiers...
    • No clear answers in sight

Cut for time

  • #13890 JSX.ElementType to 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 + on string|number-constrained T ?
  • #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