-
FAQ (For Issue Filers)
-
Common Feature Requests
-
Existing Common Requests
-
Behavior That Looks Wrong (And Arguably Is) But Is Currently Working As Intended
-
Pre-Declined Feature Requests
-
New Utility Types
-
Add a Key Constraint to Omit
-
Module Specifier Rewriting
-
Additional Logic in noUncheckedIndexedAccess
-
throws / Checked Exceptions / Typed Exceptions
-
Common Misconceptions
-
Primitives are { }, and { } Doesn't Mean object
-
{ } Does Not Refer to Objects With No Properties
-
Evolving let and Evolving Arrays Aren't any
-
(Indirect) Excess Properties Are OK
-
Number.isFinite and Number.isNaN are Typed Correctly
-
Parameter Contravariance is Correct
-
Parameter Arity Variance is Correct
-
void and undefined are Different
-
Exclude Isn't Type Negation
-
as is the Casting Operator, So it Casts
-
The ECMAScript Spec is Descriptive, not Normative
-
exclude in tsconfig.json Only Filters include
-
The "lib" in skipLibCheck Refers To .d.ts Files
-
Non-Invariants
-
Circularity Errors May Occur In The Presence of Circularities
-
Comment Preservation Not Guaranteed
-
Structural vs Instantiation-Based Inference
-
Turn On This Flag To Do That
-
Assume Array Access Might Be Out of Bounds: noUncheckedIndexedAccess
-
Require Properties to Either Be Missing or Not undefined: exactOptionalPropertyTypes
-
Enforce readonly in Subtyping / Assignability
-
Common Comments
-
What Kind of Feedback Are You Looking For?
-
Time Marches On
-
Can I Work On This?
-
Any Updates?
-
This Is Closed, But Should Be Open, Or Vice Versa
-
Other FAQs and Errors
-
Why Method Bivariance?
-
The inferred type of "X" cannot be named without a reference to "Y". This is likely not portable. A type annotation is necessary
-
FAQ Archive
-
Common "Bugs" That Aren't Bugs
-
Common Feature Requests
-
Type System Behavior
-
What is structural typing?
-
What is type erasure?
-
Why are function parameters bivariant?
-
Why are functions with fewer parameters assignable to functions that take more parameters?
-
Why are functions returning non-void assignable to function returning void?
-
Why are all types assignable to empty interfaces?
-
Can I make a type alias nominal?
-
How do I prevent two types from being structurally compatible?
-
How do I check at run-time if an object implements some interface?
-
Why doesn't this incorrect cast throw a runtime error?
-
Why don't I get type checking for (number) => string or (T) => T?
-
Why am I getting an error about a missing index signature?
-
Why am I getting Supplied parameters do not match any signature error?
-
Classes
-
Why do these empty classes behave strangely?
-
When and why are classes nominal?
-
Why does this get orphaned in my instance methods?
-
What's the difference between Bar and typeof Bar when Bar is a class?
-
Why do my derived class property initializers overwrite values set in the base class constructor?
-
What's the difference between declare class and interface?
-
What does it mean for an interface to extend a class?
-
Why am I getting "TypeError: [base class name] is not defined in __extends?
-
Why am I getting "TypeError: Cannot read property 'prototype' of undefined" in __extends?
-
Why doesn't extending built-ins like Error, Array, and Map work?
-
Generics
-
Why is A<string> assignable to A<number> for interface A<T> { }?
-
Why doesn't type inference work on this interface: interface Foo<T> { }?
-
Why can't I write typeof T, new T, or instanceof T in my generic function?
-
Commandline Behavior
-
Why did adding an import or export modifier break my program?
-
What does the error "Exported variable [name] has or is using private name [name]" mean?
-
tsconfig.json Behavior
-
How can I specify an include?
-
Why am I getting the error TS5055: Cannot write file 'xxx.js' because it would overwrite input file. when using JavaScript files?
-
Glossary and Terms in this FAQ
-
Dogs, Cats, and Animals, Oh My
-
"Substitutability"
-
Trailing, leading, and detached comments
-
Dead Links Parking Lot
-
Why is a file in the exclude list still picked up by the compiler?