TypeScript

target & lib (tsconfig)

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

ShpjegimiSQ

target vendos në cilin version JavaScript-i përkthehet kodi (p.sh. ES2022), dhe lib vendos cilat API njeh TypeScript-i — DOM për shfletuesin, ose vetëm ES për Node.

EnglishEN

target decides which JavaScript version the code is compiled to (e.g. ES2022), and lib decides which APIs TypeScript knows about — DOM for the browser, or just ES for Node.

Si ta mendosh

Si të zgjedhësh në cilën gjuhë përkthehet një libër dhe çfarë fjalori përdor përkthyesi.

Lexoje në anglisht

Like choosing which language a book is translated into and which dictionary the translator uses.

Shembull kodijson

{ "compilerOptions": { "target": "ES2022", "lib": ["ES2022", "DOM"] } }

Terma të lidhur