intermediate · No code
TypeScript Refresher
Refresh practical TypeScript fluency through type annotations, object and function types, unions, generics, narrowing, compiler feedback, and API response types. Build confidence in making everyday TypeScript code safer without advanced type-level programming.
What you'll be able to do
- Add and evaluate type annotations for variables, function parameters, and return values.
- Predict when TypeScript will infer a type and recognize when an explicit annotation makes intent clearer.
- Represent values that may take different forms with union types and use unknown instead of any when a value has not been established.
- Narrow union and unknown values with control-flow checks so the compiler can verify safe operations.
- Reason through compiler feedback and assess whether ordinary TypeScript declarations and uncertain-value handling are safe.
Who this is for
This course is for developers who have used JavaScript or basic TypeScript and want a practical refresher on everyday type safety. It fits learners who want to interpret compiler feedback, choose clearer annotations, and handle uncertain values with more confidence.
What you should already know
- Basic familiarity with JavaScript syntax, including variables, functions, parameters, and return values.
- Some prior exposure to TypeScript files, annotations, or compiler errors.
- Comfort reading short code examples and tracing what values a function may receive.
How a lesson actually goes
let count = 3, and what might an annotation such as let count: number = 3 communicate?number, so the annotation usually does not change the result. It can still make intent explicit, and annotations become more useful when there is no initializer or when you want a function's input and output types to be clear.let value = 'ready' and let value: string = 'ready'. Are they both valid, and what would you expect TypeScript to report if code later tried to assign a number to either variable?Written from this course's first lesson to show the format — not a recording of a real session.
Course content
marks each module's capstone lesson.
01Type Foundations4 lessons
Build a reliable foundation in TypeScript's type system by learning how annotations and inference describe values, then synthesize these ideas through practical type reasoning.
Course Introduction
Welcome and orientation to a practical TypeScript refresher covering annotations, object and function types, unions, generics, narrowing, compiler feedback, and API response types.
Type Annotations
Type annotations explicitly state the types that values and functions are expected to use. Learners practice recognizing where annotations clarify intent and how TypeScript reports incompatible assignments.
Type Inference
TypeScript often determines a value's type from its initializer or surrounding context. Learners distinguish inferred types from explicitly declared types and use compiler feedback to verify their reasoning.
Foundations Checkpoint
Assess foundational type reasoning by combining explicit annotations with inferred types. Learners identify valid declarations, predict resulting types, and diagnose straightforward type mismatches.
02Safer Everyday Code4 lessons
Learn to represent values that may take different forms and handle uncertain data safely. This module builds from union and unknown types to type narrowing, then synthesizes these techniques through practical compiler-guided reasoning.
Union Types
Union types describe values that can conform to more than one possible type. They make alternatives explicit while requiring code to account for each permitted form.
Unknown Values
The unknown type represents a value that could be anything while preventing operations until its type is checked. It preserves compiler feedback at boundaries where type information is incomplete.
Type Narrowing
Type narrowing uses checks such as typeof, equality comparisons, and property checks to refine a value's type within a code branch. Narrowing lets TypeScript verify that subsequent operations are safe.
Safety Review
Apply the module's ideas together to interpret compiler feedback, identify unsafe assumptions, and select types and checks that account for all permitted value forms.
Questions
Is this a beginner TypeScript course?
It is a refresher rather than a first programming course. You should already understand basic JavaScript and have seen TypeScript before, but you do not need advanced TypeScript experience.
What TypeScript topics are covered?
The course covers annotations, inference, unions, unknown, type narrowing, compiler feedback, and reasoning about safer everyday declarations and values.
Does it teach advanced generics or type-level programming?
No. The focus is practical fluency with everyday types and safety checks, not conditional types, mapped types, or advanced type-level techniques.
Will I learn when to use any versus unknown?
Yes. You will examine why unknown is safer when a value's type has not been established and how narrowing checks allow safe use of that value.
How does the one-on-one AI tutor format work?
The tutor introduces one concept at a time, asks focused questions, responds to your reasoning, and uses your answers to clarify misunderstandings before moving on.
The first lesson is ten minutes away.
Free while codeset is early. You choose what you're building before the first lesson starts, and the course is taught around it.