TypeScript

verbatimModuleSyntax & isolatedModules

Në shqip përdoret i njëjti emër.

ShpjegimiSQ

Këto opsione sigurojnë që çdo skedar mund të përkthehet veç e veç nga mjete si esbuild dhe SWC — p.sh. të detyrojnë të shkruash import type për importet që janë vetëm tipe.

EnglishEN

These options ensure each file can be translated on its own by tools like esbuild and SWC — e.g. they force you to write import type for imports that are only types.

Si ta mendosh

Si rregulli që çdo kapitull të kuptohet edhe pa lexuar të tjerët.

Lexoje në anglisht

Like a rule that every chapter makes sense without reading the others.

Shembull koditypescript

import type { Nxenes } from "./tipet";   // hiqet plotësisht nga JS
import { ngarko } from "./api";

Terma të lidhur