Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbbreuer committed Oct 17, 2024
1 parent 5bbae44 commit a92e32b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Binary file modified bun.lockb
Binary file not shown.
7 changes: 6 additions & 1 deletion src/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ async function getAllTypeScriptFiles(directory?: string): Promise<string[]> {
return Array.prototype.concat(...files).filter(file => extname(file) === '.ts')
}

export async function generate(options?: DtsGenerationOption): Promise<void> {
await generateDeclarationsFromFiles({ ...config, ...options })
}

async function writeToFile(filePath: string, content: string): Promise<void> {
await Bun.write(filePath, content)
}
Expand All @@ -205,7 +209,8 @@ async function checkIsolatedDeclarations(options: DtsGenerationConfig): Promise<
const tsconfigPath = options.tsconfigPath || join(options.root, 'tsconfig.json')
const tsconfigContent = await readFile(tsconfigPath, 'utf-8')
const tsconfig = JSON.parse(tsconfigContent)
return tsconfig.compilerOptions?.isolatedModules === true

return tsconfig.compilerOptions?.isolatedDeclarations === true
} catch (error) {
return false
}
Expand Down

0 comments on commit a92e32b

Please sign in to comment.