Getting started and complete workspace guide
Your first three minutes
This academy teaches how static types catch incompatible operations before JavaScript runs, and why real programs still need runtime validation and tests. It needs no API key or account.
- Open the academy and click Discover TypeScript in Three Minutes.
- Read Discover and enter your prediction. Find the editable main.ts source.
- Click Compile and Run. The bundled official compiler checks the source; actual emitted JavaScript produces 75.
- Change calculateTotal(25, 3) to calculateTotal(25, 4). Run again and observe 100.
- Change 4 to "four" including quotes. Click Compile. Read the actual TS2345 diagnostic; click its location to focus the source.
- Restore 3. Click Check My Work to compare against the original exact expected 75.
- Write an explanation. Click Save Explanation and Notes. Click Export Project to download actual source and emitted JavaScript.
- Use Continue to Lesson 2, the learning path, lesson search or Jump to Lesson to choose your next topic.
How to work through every lesson
Discover the problem → Predict before running → Understand the explanation and important lines → Experiment with the five prepared examples → Build the repair exercise → Test against an exact expected contract → Explain evidence → Reflect on limitations → Extend with a new independent case.
The five examples are: a useful working baseline, an intentional compiler/runtime fault, a compiler-clean behavioral counterexample, an executable output contract, and an independent transfer example. Faults are deliberately wrong; reproducing their recorded result never awards a repaired lesson. AI prompts are optional and never complete required work for you.
Navigation and every major control
- Start Here
- Three entry paths and the first short experiment. It is not a permanent banner above your editor.
- Learn
- 100 lessons in 20 expandable modules. Search filters titles; Jump to Lesson directly selects one. Previous/Continue move through the path. Bookmark stores a reminder.
- TypeScript Lab
- Twelve free workspaces and 45 focused experiments. Contract generators write actual editable TypeScript; Compile evaluates it. Free experiments have no universal passing answer.
- Challenges
- Choose coding challenges, investigations or knowledge checks, then filter by module or text. Open Teaching Lesson explains the source behind a task.
- Projects
- Thirty focused working application cores. Load Finished Project supplies the actual solution. Load Starter replaces model.ts with an explicit implementation task. Select model.ts from Source File, edit it, then Run Project Tests.
- My Progress
- Current passing objective records, bookmarks, transparent next-step recommendation, named source copies and backup recovery. Visits and clicks are not mastery. Explanations require self/educator review.
- Learning mode / Appearance
- Guided mode opens teaching explanations; independent and professional modes reduce expanded guidance. Light/dark appearance changes the presentation. Neither bypasses tests.
- Source File / editor
- Choose a supplied file and edit its actual source. Changes invalidate previous check evidence. Ctrl/Command+Enter runs; Ctrl/Command+] inserts two spaces. Tab leaves the editor.
- Compile
- Checks all project sources with official TypeScript 6.0.3 and displays actual diagnostics, type information and emitted JavaScript. It does not execute code.
- Compile and Run / Stop
- Runs emitted JavaScript only when checking succeeds. Stop ends the disposable runtime and compiler job. Workers have a three-second limit; long-running application code is not supported.
- Execution Environment
- Choose worker for console programs, isolated browser DOM preview for document/forms/events. The preview blocks external network requests and uses local fixtures. Its state ends when rerun.
- Diagnostics / Emitted File / Actual Compiler Type Information
- Select a diagnostic or symbol to focus its source. Emitted File switches actual JavaScript outputs. Type filter searches actual symbols/types; Show All Source Positions exposes flow-narrowed references as well as declarations. Function cards show resolved signatures and actual argument types, not universal runtime tracing.
- Compiler Settings
- Changes real strictness flags or target. Strict toggles its explicit implicit-any/null-check overrides together. Other overrides are individually selectable. This lab fixes module emission to CommonJS for its relative-only loader.
- Source Display and Project Files
- Change code font size, inspect a line-numbered highlighted view, create/duplicate/rename/delete safe relative files, or Reset Example. main.ts is required. Runtime imports must point to included project-relative implementation files; external npm packages do not run here.
- Load Example / Load Repair Exercise / Reset Example
- Replace the working source only after confirmation. A repair exercise starts faulty. Reset restores the prepared reference for the current activity.
- Check My Work / Run Project Tests
- The first compares actual compilation and output with an authored case. The second executes the project's independent model tests.ts. A passing example does not prove all possible inputs or accessibility behavior.
- Show Finished Code
- Reveals reference source without changing your draft or awarding credit. For a complete application, use Load Finished Project, then Export Project.
- Save / Copy Source / Export Project
- Save stores drafts and notes in IndexedDB on this browser. Copy copies the active file. Export downloads source, ready-built output, a pinned development build script and setup/testing/publishing instructions.
- Save Named Copy / Duplicate / Load / Rename / Delete
- Available in free workspaces. Choose an existing saved entry for replacement or renaming; Duplicate makes a separate copy. Loading opens the Application Build Studio. Deletion asks first.
- Import/Export Source JSON
- Application Build Studio supports a plain filename-to-source map. This differs from a versioned learning backup.
- Prompt Studio
- Choose a goal, Build Contextual Prompt, edit and copy it to your chosen assistant. It includes current code, errors, objectives and expectations. No AI request occurs on this site. Remove private data before copying and independently verify proposed changes.
- Export/Import JSON Backup / Reset All Learning Data
- A portable version-1 record of drafts, notes, preferences and saved copies. Import asks before replacing local data and clears check credit until rerun. Reset clears this academy only; export a backup first.
Get the actual finished code
- Open Projects and choose an application.
- Click Load Finished Project and confirm.
- Select main.ts, model.ts, shared.ts and tests.ts in Source File to understand their responsibilities.
- Click Compile and Run, submit the form in the preview, then click Run Project Tests.
- Click Export Project. Extract all files. Publish index.html, styles.css and dist/app.js together, or edit the .ts files and run the documented development build.
The workbench does not silently implement a starter. You edit the source yourself, use hints progressively, or explicitly load the finished version. The independent exported website needs no production TypeScript compiler.
When something is confusing or fails
- Nothing runs: wait for the local compiler to load, inspect the first diagnostic and correct it. Errors block emission in this lab.
- document is unavailable: select DOM Preview for browser examples.
- Output differs but there are no diagnostics: inspect arithmetic, conditions, data assumptions and your expected test. Types do not prove business correctness.
- A fetch/Google/AI example does not connect: the offline workshop uses documented local fixtures. It never implies real credentials or provider access. Follow project-specific server setup separately.
- A source import fails: include main.ts and supported safe filenames, keep relative dependencies together, and stay within 40 files/500 KB.
- Your passing check disappeared: changing source/settings invalidates evidence; rerun tests for that version.
- Saved work is missing: browser clearing, private browsing or a different origin can isolate/delete local records. Import an exported JSON backup.
- Exported changes do not appear: run npm install then npm run build in the extracted development project, or use its already-built dist/app.js unchanged. Upload all relative files.