Skip to content

Commit

Permalink
fix: do not require tsconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuslundgard committed Oct 25, 2023
1 parent 72ac650 commit 2ab178c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node/core/ts/loadTSConfig.ts
Expand Up @@ -4,13 +4,13 @@ import ts from 'typescript'
export async function loadTSConfig(options: {
cwd: string
tsconfigPath: string
}): Promise<ts.ParsedCommandLine> {
}): Promise<ts.ParsedCommandLine | undefined> {
const {cwd, tsconfigPath} = options

const configPath = ts.findConfigFile(cwd, ts.sys.fileExists, tsconfigPath)

if (!configPath) {
throw new Error(`could not find a valid '${tsconfigPath}'`)
return undefined
}

const configFile = ts.readConfigFile(configPath, ts.sys.readFile)
Expand Down

0 comments on commit 2ab178c

Please sign in to comment.