Skip to content

Commit a92e32b

Browse files
committed
chore: wip
1 parent 5bbae44 commit a92e32b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

bun.lockb

-52.5 KB
Binary file not shown.

src/generate.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,10 @@ async function getAllTypeScriptFiles(directory?: string): Promise<string[]> {
196196
return Array.prototype.concat(...files).filter(file => extname(file) === '.ts')
197197
}
198198

199+
export async function generate(options?: DtsGenerationOption): Promise<void> {
200+
await generateDeclarationsFromFiles({ ...config, ...options })
201+
}
202+
199203
async function writeToFile(filePath: string, content: string): Promise<void> {
200204
await Bun.write(filePath, content)
201205
}
@@ -205,7 +209,8 @@ async function checkIsolatedDeclarations(options: DtsGenerationConfig): Promise<
205209
const tsconfigPath = options.tsconfigPath || join(options.root, 'tsconfig.json')
206210
const tsconfigContent = await readFile(tsconfigPath, 'utf-8')
207211
const tsconfig = JSON.parse(tsconfigContent)
208-
return tsconfig.compilerOptions?.isolatedModules === true
212+
213+
return tsconfig.compilerOptions?.isolatedDeclarations === true
209214
} catch (error) {
210215
return false
211216
}

0 commit comments

Comments
 (0)