TypeScript

export type & re-exports

Në shqip: Eksportimi i tipeve

ShpjegimiSQ

export type { Nxenes } eksporton vetëm tipin, pa kod JS. Skedarët „barrel“ (index.ts që ri-eksporton gjithçka) janë praktikë, por në projekte të mëdha mund të ngadalësojnë build-in dhe testet.

EnglishEN

export type { Student } exports only the type, with no JS code. “Barrel” files (an index.ts re-exporting everything) are convenient, but in big projects they can slow down builds and tests.

Si ta mendosh

Si një tabelë drejtimesh në hyrje të ndërtesës.

Lexoje në anglisht

Like a directory board at a building's entrance.

Shembull koditypescript

// index.ts
export type { Nxenes } from "./tipet";
export { merrNxenesit } from "./api";

Terma të lidhur