Skip to content

Commit e04712e

Browse files
committed
chore: update jsdoc
1 parent 55adb6f commit e04712e

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

playground.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import { generateDts } from './src'
22

3-
const result = await generateDts(['src/index.ts'], {
3+
console.time('time')
4+
await generateDts(['src/index.ts'], {
45
inferTypes: true,
56
})
7+
console.timeEnd('time')
68

7-
console.log(result.files[0].dts)
9+
// console.log(result.files[0].dts)

src/options.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,13 @@ export type GenerateDtsOptions = {
4444
*/
4545
minify?: boolean
4646
/**
47-
* Whether to use typescript native compiler for generating declaration files.
48-
* When enabled, you won't need explicit type annotations for exports (which are required by default when using isolated declarations).
47+
* When using isolated declarations, exports typically require explicit type annotations.
48+
*
49+
* When this option is enabled, TypeScript's compiler is used to generate declaration files,
50+
* which will automatically infer the types of exports, eliminating the need for explicit type annotations.
51+
*
52+
* This option is enabled by default if `isolatedDeclarations` is disabled or not specified
53+
* in your tsconfig.json's compilerOptions.
4954
*/
5055
inferTypes?: boolean
5156
}

0 commit comments

Comments
 (0)