File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -196,6 +196,10 @@ async function getAllTypeScriptFiles(directory?: string): Promise<string[]> {
196
196
return Array . prototype . concat ( ...files ) . filter ( file => extname ( file ) === '.ts' )
197
197
}
198
198
199
+ export async function generate ( options ?: DtsGenerationOption ) : Promise < void > {
200
+ await generateDeclarationsFromFiles ( { ...config , ...options } )
201
+ }
202
+
199
203
async function writeToFile ( filePath : string , content : string ) : Promise < void > {
200
204
await Bun . write ( filePath , content )
201
205
}
@@ -205,7 +209,8 @@ async function checkIsolatedDeclarations(options: DtsGenerationConfig): Promise<
205
209
const tsconfigPath = options . tsconfigPath || join ( options . root , 'tsconfig.json' )
206
210
const tsconfigContent = await readFile ( tsconfigPath , 'utf-8' )
207
211
const tsconfig = JSON . parse ( tsconfigContent )
208
- return tsconfig . compilerOptions ?. isolatedModules === true
212
+
213
+ return tsconfig . compilerOptions ?. isolatedDeclarations === true
209
214
} catch ( error ) {
210
215
return false
211
216
}
You can’t perform that action at this time.
0 commit comments