Skip to main content
pelatihan
.org
Learn. Practice. Grow.
Category
EN
Sign in
Sign up
Menu
TypeScript Curriculum: 1 Chapters, 40 Lessons — pelatihan.org
Home
/
Catalog
/
TypeScript
/
Curriculum
Curriculum
TypeScript Curriculum
Learn TypeScript online with 40 structured lessons, code examples, and 200 quiz questions.
40 lessons
1 chapters
200 questions
Summaries and key points are free to preview. Full lessons, code examples, and quizzes require a subscription.
01
TypeScript tutorial
40 lessons
01
TS HOME
This page is a typeScript entry that lists topics from basic to advanced. TypeScript is JavaScript that is equipped with a static type system so many errors are caught before the…
02
TS Introduction
TypeScript is a JavaScript superset that adds optional static type and development aids. TypeScript code is compiled into JavaScript so that it remains running in the same…
03
TS Get Started
To start using TypeScript, install the global package through npm and then compile the file with the tsc command. The compiler converts each file .ts to .js while checking for…
04
TS Simple Types
TypeScript provides simple primitive types such as string, number, boolean, bigint, symbol, and P1. This type is declared with an annotation after the variable name so that the…
05
TS Explicit & Inference
Type inference is the ability of TypeScript to guess the type of a value without explicit annotation. Explicit annotation is used when the type needs to be known beforehand or…
06
TS Special Types
TypeScript provides special types such as any, unknown, void, never, and null for specific situations. Any removes type checks, while unknown remains secure because it must be…
07
TS Arrays
The TypeScript array stores a set of values of the same type and is declared with a type pattern[]. Since the type is locked, adding different values will trigger compilation…
08
TS Tuples
A Tuple is an array with a fixed length and type at each position. Each index has its own type so that mixed data such as text pairs and numbers remain secure. TypeScript also…
09
TS Object Types
Object type describes the shape of an object as a list of properties and their types. You can write it directly to the variable annotation, including marking the optional…
10
TS Enums
Enum allows defining a set of named constants, such as a list of status or colors. By default the first member is 0 and then one is added, and the initial value can be changed as…
11
TS Aliases & Interfaces
Type alias gives other names to any type, including unions and objects. Interface defines a contract as a property and method that an object or class must satisfy. The two are…
12
TS Union Types
Union type combines several types with pipe markings so a value can be one of them. Before using a special property, the type must be narrowed down through a check. Discriminated…
13
TS Functions
The TypeScript function can be annotated for parameters or return values, so the calling error is caught early. The parameters support question marks for optional and rest…
14
TS Casting
Casting or type assertion tells the compiler that you know the actual type better than the result of the inference. The syntax can be either an ace keyword or a generic form in…
15
TS Classes
Class TypeScript adds private, protected, public, and readonly access modifiers to the JavaScript class. The modifier controls who can touch a field while helping encapsulate.…
16
TS Basic Generics
Generic allows one function or type to work for different data types without compromising type security. The generic parameters are written in square brackets like T and can be…
17
TS Utility Types
Utility types are built-in TypeScript types that help manipulate existing types. Partial, Readonly, Pick, Omit, and Record accelerate data modeling without rewriting the…
18
TS Keyof
The keyof operator takes the list of keys from a type and produces a literal union. The result can be used to write a secure util against a wrongly typed property name.
19
TS Null
TypeScript can treat null and undefined strictly through the strictNullChecks option. With this mode, the possible values of the voids should be checked first using optional…
20
TS Definitely Typed
Definitely Typed is a community repository containing type declarations for JavaScript libraries that do not support TypeScript. The type is available via the @types/ package and…
21
TS 5 Updates
TypeScript 5 introduced support for ECMAScript standard decorators, type parameters, and improved compiler performance. The satisfies feature allows checking the shape of the…
22
TS Configuration
Tsconfig.json is the configuration hub of the TypeScript project, containing target, outDir, strict, and many other options. The strict option enables strict checks including…
23
TS with Node.js
TypeScript is widely used on Node.js servers to build APIs and services. You need to install typescript along with @types/node to make global types and built-in modules…
24
TS with React
React can be developed in conjunction with TypeScript with the extended file .tsx. The component's props are declared as an interface or type so that the input data is exactly as…
25
TS Tooling
The TypeScript tooling ecosystem includes ESLint for code analysis, Prettier for automated formatting, as well as a built-in IDE debugger. The combination of the two maintains…
26
TS Advanced Types
Advanced types such as intersection, mapped type, and indexed access allow for complex data modeling. Intersection combines two types so the result has all the properties of…
27
TS Type Guards
Type guard is a runtime check that allows the compiler to infer narrower types on a particular block. Operators typeof and instanceof are built-in guards, while custom guards can…
28
TS Conditional Types
Conditional type decides type based on the relationship extends, with the pattern T extends U? X : Y. When T is a union, the conditional is distributive to each member. The infer…
29
TS Mapped Types
Mapped types build new types by iterating the properties of other types using the [K in Keys] pattern. You can add a readonly or optional modifier, even replace the key name with…
30
TS Type Inference
Type inference works from the initial value, the return value, to the context of using an expression. TypeScript concludes that the type is as low as possible to remain accurate,…
31
TS Literal Types
The literal type limits a type only to certain values, for example just "public" or just the number 42. The value with the as const retains the literal so that the type does not…
32
TS Namespaces
Namespace groups names so they don't clash with other modules in a project. Namespace members are exported with the export keyword and then accessed through the dot. For modern…
33
TS Index Signatures
Index signature declares a type of value for all keys of a particular type, such that each string becomes a number. This pattern is useful for dictionaries, configurations, or…
34
TS Declaration Merging
Declaration merging occurs when two declarations of the same name combine the compiler into one definition. Two interfaces with the same name will merge, while two alias types…
35
TS Async Programming
Asynchronous programming in TypeScript uses Promise and async await with clear type. The async function always returns Promise even if you write the return regularly. Error…
36
TS Decorators
A decorator is a special function that is marked @ to modify a class, method, or property. This pattern is common for logging, validation, and other declarative behavior.…
37
TS in JS Projects
Older JavaScript projects can benefit from type through JSDoc annotations and allowJs and checkJs options. With checkJs, TypeScript checks the type directly on the .js file…
38
TS Migration
The migration from JavaScript to TypeScript should be done in stages, starting with a new module or library core. The allowJs option allows the mixing of .js and .ts files during…
39
TS Error Handling
TypeScript error handling uses try, catch, throw, and finally like JavaScript, with additional type information. In strict mode, the catch value is unknown so it is mandatory to…
40
TS Best Practices
TypeScript best practices include avoiding any overuse, turning on strict mode, and typing at the intermodal boundary. Use the built-in type and official declaration for…