TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.
TypeScript provides static typing, better tooling, and improved code maintainability.
The file extension for TypeScript files is .ts.
You can compile a TypeScript file using the 'tsc' command.
It is a configuration file for TypeScript that specifies compiler options.
Interfaces define the structure of an object.
'interface' is used for object types, while 'type' can define any type.
Enums are a way to define a set of named constants.
The 'any' type allows a variable to hold any type of value.
The 'unknown' type is a safer alternative to 'any'.
The 'never' type represents values that never occur.
TypeScript automatically infers the type of a variable.
Generics allow you to create reusable components with type safety.
'const', and 'var' in TypeScript?,'let' and 'const' are block-scoped, while 'var' is function-scoped.
You define a function using the 'function' keyword and optionally specify parameter and return types.
A union type allows a variable to hold one of several types.
A type alias is a name for any type, defined using the 'type' keyword.
Mapped types allow you to create new types by transforming existing ones.
These are access modifiers that control the visibility of class members.
Decorators are special annotations used to modify classes, methods, or properties.
The 'readonly' modifier makes a property immutable after initialization.
'Partial' makes all properties of a type optional.
'Pick' creates a new type by selecting specific properties from an existing type.
'Omit' creates a new type by excluding specific properties from an existing type.
An abstract class can have implementation, while an interface cannot.
The 'keyof' operator returns a union of the keys of a type.
'Record' creates a type with specified keys and values of a specific type.
Type assertion allows you to override TypeScript's inferred type.
'unknown' is safer than 'any' because it requires type checking before use.
'extends' is used for inheritance, while 'implements' is used to enforce an interface.
Conditional types allow you to create types based on a condition.
Template literal types allow you to create new string types by combining string literals.
The 'infer' keyword is used in conditional types to infer a type variable.
Utility types are built-in types that help manipulate other types.
'Exclude' removes specific types from a union type.
'Extract' selects specific types from a union type.
'NonNullable' removes 'null' and 'undefined' from a type.
'ReturnType' extracts the return type of a function.
'InstanceType' extracts the instance type of a constructor function.
Index signatures define the type of keys and values in an object.
The 'this' type represents the type of the current object.
Tuple types allow you to define an array with fixed types and lengths.
Discriminated unions use a common property to distinguish between types in a union.
The 'as const' assertion makes an object or array readonly and infers literal types.
Module augmentation allows you to add new declarations to an existing module.
Declaration merging combines multiple declarations with the same name into one.
Ambient declarations define types for external libraries or modules.
'namespace' is for internal modules, while 'module' refers to external modules.
The 'unknown' type is a safer alternative to 'any' and requires type checking.
'strict' mode enables all strict type-checking options for better type safety.