Skip to content

Error UX Improvement Sync, 6/28/2018 #25306

Closed
@DanielRosenwasser

Description

@DanielRosenwasser

Stripping null and undefined from targets

#25287

  • We already avoid elaborating when relating primitives to unions.
  • Action item: don't work on primitives, just work on objects.

User Test Suite

#25294

  • Signed off
  • @Andy-MS, can you take a look at that weird change?

Exposing diagnostic codes to related error spans

#25304

  • Should codes be Error? Suggestion? Info?
  • Discuss in issue.

Related Error Spans

#25257

  • Reprioritized
  • Duplicate declaration/redeclared block scoped variable errors
    • Having the link to the declarations is useful
    • But usually it's not that you have 100 of the same error, it's usually that you have 100 errors in two files respectively (because they're identical).
    • Maybe limit 5 duplicate declaration error within a file, taper off with "N other duplicates have been detected"
    • If all the top-level declarations are duplicate, potentially just consider the file a duplicate?
    • Maybe say "File A duplicates identifiers x, y, z, a, ..., q from file B".
      • This one seems good.
      • We'll figure out how to do it
    • Action item: file an issue for better consolidation.

Most searched errors (?)

  • We literally typed in error TS into Google and let it auto-complete.
    • Probably good enough.
  • TS2339, TS2307, TS2304, TS2322, TS2531, TS1005, TS2305, TS2345, TS2306
  • "error ts2304 cannot find name"
    • Google completes with require, map, buffer, describe, $, asyncIterator, process, symbol, module, promise
    • Should we provide a better error on these?
      • Yes!
    • You're using $ => Suggest jQuery
    • You're using describe => Did you mean to have types for mocha, jest, etc.?
    • process, require, module => Node types
    • Symbol, Promise, Map, Set, asyncIterator => Different lib or target.
    • Action item: Better elaborations
  • "error ts2531 object is possibly 'null/undefined'"
    • What can we do?
      • Possibly tell people to use the !?
      • Might be the wrong way to lead users down the right path.
  • "Typescript error TS1005: ';'"
    • Recurring issue with Visual Studio installations not overriding existing tsc.
  • "Argument of type X is not assignable to parameter of type Y"
  • "File is not a module"
    • How do we explain modules to people in the terminal?
    • Could provide an explanation in every error
      • Becomes noisy
        • Rust has a suggestion to run with --showElaborations.
    • Provide a link?
      • But you don't want to provide a link for every error.
    • "Consider searching Google for-"
      • lol

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