import type
Në shqip përdoret i njëjti emër.
ShpjegimiSQ
import type { Termi } from "./tipet" importon vetëm tipin, jo kod — dhe hiqet plotësisht kur përkthehet në JavaScript. E bën të qartë që po merr vetëm një përshkrim dhe i ndihmon bundler-at.
EnglishEN
import type { Term } from "./types" imports only the type, not code — and is removed completely when compiled to JavaScript. It makes clear you're only taking a description, and helps bundlers.
Si ta mendosh
Si ta marrësh vetëm planin e shtëpisë, jo vetë tullat.
Lexoje në anglisht
Like taking just the house plan, not the bricks.
Shembull koditypescript
import type { Termi } from "./tipet";
import { kerko } from "./kerko";