

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: Install TypeScript
incomplete
2: tsconfig.json
incomplete
3: More tsconfig.json
incomplete
4: Declaration Files
incomplete
5: Using JS Libraries
incomplete
6: TypeScript Language Server
incomplete
7: TypeScript Ignore
incomplete
8: Vanilla Vite
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
I try really hard to avoid using these, but sometimes they are the best choice among a host of bad choices.
// @ts-ignore: Ignores the next line's errors.
// @ts-ignore
const x: number = "not a number"; // Error suppressed
// @ts-nocheck: Disables type checking for the entire file.
// @ts-nocheck
const x: number = "not a number"; // No error
const sum(x: number, y: number): string {
return x + y; // No error
}
These comments do what they say on the box: dangerously suppress type errors. Use them very sparingly, or ideally, not at all.
Management at Support.ai is sick of maintaining the global.d.ts file for the Window.supportAI type. They've decided it's better to just add @ts-ignore... who needs good developer experience anyway?
tsc
Run and submit the CLI tests.