Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Design Meeting Notes, 9/13/2019 #33422

Closed
Closed
@DanielRosenwasser

Description

@DanielRosenwasser

Private Fields in .d.ts Files

#30829

  • One issue is that .d.ts files are sometimes lossy because private fields omit their types.
    • We probe the structure
  • The variance issue sounds like something we're not likely to address.
    • It's broken today for private, why change for #?
  • Perhaps it makes sense to just include a single #_ declaration in the output if we're just erasing all details.
    • Why don't we just include the original privates in the class declarations?
      • Because you don't want 30 privates in your classes?
      • But that's the case for private properties today.
    • Do private fields affect incremental and project references?
      • Yes, but they probably shouldn't.
      • A point in favor of emitting a single private property?
  • So #_?
    • #privateProperty just so people can search it online more easily.

Collisions of Imported Types

#31231

  • Introducing an error when types conflict with local type names.
import { foo } from "./stuff";
export type foo = foo;
  • Breaks legitimate errors in firebase-firestore, glimmer, skype, vscode.
    • VS Code examples seemed suspicious.
  • The general pattern is useful when running with isolatedModules, but there's no reason to use the same name.
  • This is a breaking change, but the break seems legitimate, existing code seems wrong, and the fix is simple.

@RyanCavanaugh has the other notes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Design NotesNotes from our design meetings

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions