Skip to content

Suggestion Backlog Slog, 2/25/2019 #30117

Closed
@RyanCavanaugh

Description

@RyanCavanaugh
  • Show unused public properties and methods #29293 Identify unused public methods
    • "unused" ?
      • Public members of nonpublic types?
      • Is this exported?
      • Is there a "library" / "application" distinction?
    • Too hard to define what the entry point surface of a compilation unit is
    • AMF
  • Use generic defaults for "empty" constructors of Array, Map, Set #29786
    • An error is the desired behavior
    • Depends on what's in lib.d.ts
    • Why does this work on Ryan's machine??
  • Skip typechecking; only emit (support --transpileOnly in tsc, re-open of #4176) #29651
    • Long discussion of syntax vs "grammar" vs semantics errors
    • Ryan wants syntax errors to block (his) emit
    • Is this just piping errors to /dev/null ?
      • No
      • This user clearly would want syntactic errors to appear
    • Long backstory of which phase reports which errors and why
    • We could move "grammatical" errors from check to bind
      • Would pay a responsiveness penalty
    • Wait, what does transpileModule do with grammatical errors?
    • Why is this user's project so slow?
    • Is this a global project or a module project?
  • Mapped Types should distribute over union types #28339
    • Pick is not homomorphic, so this doesn't distribute
      • It is "sub" homomorphic though
        • Should this suffice?
        • If so, how?
          • Unclear how to relate keyof results after they're already resolved on a non-generic
    • Unclear how to fix
    • Pick / Omit / etc with their identity-providing inputs (keyof ,never) are not true identities
declare function fn(x: MappedFooOrBar): void;
// Desired: Not OK
fn({ x: true, foo: undefined });
// Desired: OK
fn({ x: false });
  • Potential: `Pick<T, K extends keyof T> = T extends unknown ? { ...}
  • See what breaks in RWC

Metadata

Metadata

Assignees

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

      Participants

      @RyanCavanaugh

      Issue actions

        Suggestion Backlog Slog, 2/25/2019 · Issue #30117 · microsoft/TypeScript