VSCode JSDoc mafoko a a itirisang a go thibela sediriswa sa phetolo ya tshwaelo      

Sediriswa se se thusang sa go rarabolola ka bonako diphatlha tsa mela ya mafoko a JSDoc ka go dirisa theke ya @sekao, ya JavaScript/TypeScript
Tsenya mafoko go tlhagisa ditshwaelo ka go itirisa (Text)
⇊⇊⇊
⇈⇈⇈
Tsenya ditshwaelo go busetsa mafoko ka go itirisa (Comment)

VSCode / Cursor JSDoc: Go Tokafatsa Ditokomane tsa JavaScript


JSDoc - Wikipedia
JSDoc ke jenereithara e e maatla ya ditokomane tsa JavaScript. E dirisa ditshwaelo tse di fometetsweng ka tsela e e kgethegileng go tlhama ditokomane tsa API tse di tletseng tsa khoutu ya gago. Ka go tsenya ditshwaelo tsa JSDoc mo difaeleng tsa gago tsa JavaScript, o ka tlamela ka tshedimosetso e e tlhapileng le e e rulagantsweng ka ga ditiro tsa gago, ditlelase, le dimmojulu.

Dikarolo tsa konokono tsa JSDoc:

Tshedimosetso ya mofuta
Dipharametara tsa tiro le boleng jo bo busediwang
Ditlhaloso tsa phaposi le mokgwa
Ditokomane tsa mmojule
Theke e le nngwe e e mosola thata mo JSDoc ke theke ya @example. Theke eno e go letla go akaretsa dikao tsa khoutu mo ditokomaneng tsa gago. Se se farologanyang sedirisiwa sa rona ke bokgoni jwa sone jwa go boloka go fometa, go tsenya, le go kgaoga ga mela mo teng ga theke ya @example. Se se raya gore o ka kwala dikai tsa khoutu tse di balegang le tsa mmatota, go dira gore go nne bonolo gore batlhami ba tlhaloganye kafa ba ka dirisang ditiro kgotsa ditlelase tsa gago ka gone.

Sekao sa tiriso:
/**
 * Calculates the sum of two numbers.
 * @param {number} a - The first number.
 * @param {number} b - The second number.
 * @returns {number} The sum of a and b.
 * @example
 * // This example preserves formatting and line breaks
 * const result = add(5, 3);
 * console.log(result);
 * // Output: 8
 */
function add(a, b) {
    return a + b;
}
Ka go dirisa jenereitara ya rona ya ditshwaelo tsa JSDoc ya mo inthaneteng, o ka tlhama bonolo fela ditokomane tse di rulagantsweng sentle tse di akaretsang go rulaganya go go bolokilweng mo dikaong tsa gago tsa khoutu, go dira gore ditokomane tsa gago tsa JavaScript di tlhaloganyesege sentle e bile di nne le matswela.