-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
Design NotesNotes from our design meetingsNotes from our design meetings
Description
Erroring on Types and Namespaces Named undefined
- You can currently create variables, types, and namespaces named
undefined
. - Technically this is implemented to-spec - you can rename a variable
undefined
. - We could be more extreme about this.
- We're okay with forbidding in type names (e.g. type parameters, type aliases, interfaces...), but not in namespaces and variables.
Understanding no-default-lib
- What does
no-default-lib
mean? - Originally, we wanted people to be able to specify an alternative
lib
.- We created
no-default-lib
to say "I have my own lib, don't provide one." - This precedes
noLib
and thelib
array.
- We created
- Who uses it?
- Deno uses it - kinda makes sense?
- Let's ask Deno folks about why they need it.
- Some people on GitHub are using it in questionable ways.
- Deno uses it - kinda makes sense?
- What is it supposed to do when someone has a
lib
array set? - This is spooky action at a distance. The fact that this can appear in a
.d.ts
file and override your compiler settings is extremely sketchy. - We want to deprecate this.
- Wait we remember now -
skipDefaultLibCheck
also uses these directives to skip full type-checking of these files.- But we also have
skipLibCheck
- But you don't always want that because hand-authored
.d.ts
files should be checked.
- But you don't always want that because hand-authored
- But we also have
- We would like to come up with an alternative, we want to deprecate this (6.0 Deprecation Candidates #54500)
Type Predicate Function Inference
- We like the PR, we just want to hunt down that 1% performance regression.
uhyo, danvk, Andarist and ExE-Boss
Metadata
Metadata
Assignees
Labels
Design NotesNotes from our design meetingsNotes from our design meetings