Skip to content

Commit

Permalink
chore: add jsDoc example
Browse files Browse the repository at this point in the history
  • Loading branch information
qmhc committed Jul 23, 2023
1 parent 56917e2 commit 4738ab2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/ts/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface Test extends TestBase {

export { testFn } from './comment'
export { Decorator } from './decorator'
export { addOne, add } from '@/js-test.js'
export { addOne, add, jsdoc } from '@/js-test.js'
export { ESClass } from './es-class'
export { manualDts } from './manual-dts'

Expand Down
9 changes: 9 additions & 0 deletions examples/ts/src/js-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,12 @@ export const addOne = x => parseFloat(x) + 1
export function add(...args) {
return args.reduce((total, num) => total + num, 0)
}

/**
* @param {number} one
* @param {number} two
* @returns {string}
*/
export function jsdoc(one, two) {
return `${one + two}`
}

0 comments on commit 4738ab2

Please sign in to comment.