close
Skip to content

Design Meeting Notes, 3/13/2020 #37389

@DanielRosenwasser

Description

@DanielRosenwasser

Update on Intersections and Optional Properties

#37195

Relating Instances of the Same Signature

#31029

  • When we have signatures that have generic type parameters, we currently erase the type parameters before we compare them.
  • This is an old issue/PR, but it was pretty breaky.
  • Basically, the getter/setters make the types invariant.
  • This change would break completions and the like in addition to actual errors.
  • Introduces some breaks in Ember
  • Maybe we need a second pair of eyes
  • Could we put this under strictFunctionTypes?
    • Pretty sure that Ember already is under strictFunctionTypes.
    • But that means that users can't run with strictFunctionTypes.
    • But the API inherently has problems there.
    • Means that on top of changing the .d.ts files, users would have to upgrade.
  • Conclusion: try this under strictFunctionTypes, see if we can introduce a new flag instead.

Spread Elements and const assertions

#37357

Indexing with identical bindings of type keyof Foo

#32693

  • This one keeps coming up.
  • The code itself is reasonable.
  • If the key on both sides is the "same" for some meaning of "same", then this feels reasonable.
    • What does "same" mean?
    • Same identifier maybe. Clearly not the same type.
  • Maybe check against binary assignments.
    • But these can occur arbitrarily deep in an object literal.
    • People are typically just trying to copy over property declarations in bulk.
  • How does this work when an indexing expression has a type that's the intersection of each type's key?
    • source: { A, B }, target: { B, C }, index: "B"?
  • Conclusion: approved for the basic case.

skipLibCheck (and pretty?) in config files from tsc --init

#37361

  • Problems: hello world check time is >1s.
  • For tsc --init, we can always change this.
  • Seems good to turn it on there, but we must always make sure that .d.ts files are checked somewhere.
    • DefinitelyTyped, lib.d.ts
  • What else should we turn on in tsc --init?
    • --incremental?
      • Afraid people will check in their .tsbuildinfo files.
  • Ask is for skipLibCheck to be included in tsc --init, not that it's turned on.
  • 4 levels of tsc --init include-ness
    • Emitted with a comment
    • Emitted with a comment where it's not set to the default
    • Emitted with a value that's a default
    • Emitted with a value that's not a default
  • Conclusion
    • Should have a link to the tsconfig page on our website.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Design NotesNotes from our design meetings

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions