Skip to content

Design Meeting Notes, 1/10/2025 #60984

Open
@DanielRosenwasser

Description

Make lib Replacement Opt-In by Default

#60829

  • Since TypeScript 4.5, we've supported loading lib files from node_modules if something is located in @typescript/lib-*.
  • But this lib replacement is on for everyone by default, and that leads to us
    • doing a whole bunch of module resolution all the time at project load going up the spine
    • add file watchers for each of the directories that don't exist.
  • This is a perf hit for everyone (and it's noisy to look at when diagnosing issues) so we want to make it opt-in.
  • According to a rudimentary search, 352 files across all of GitHub use a custom dom. Limited impact?
  • 2 major groups who originally asked for this?
    • People who need to lock on an older dom file like @types/web.
    • People who want a custom version of the built-in lib.
  • How do we roll this out?
    • Introduce this in 5.8, and then make it the default in 6.0.

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