Skip to content

Commit

Permalink
fix: Use specific lib when parsing typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanmenzel committed Feb 5, 2025
1 parent 8d3dbc2 commit fec7d37
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/parser/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ export function createTsProgram(options: PuyaTsCompileOptions): CreateProgramRes
const compilerOptions: ts.CompilerOptions = {
allowJs: false,
strict: true,
target: ts.ScriptTarget.ES2022,
// Lib names need to be the full file name from the typescript package 'lib' folder.
lib: ['lib.es2023.d.ts'],
target: ts.ScriptTarget.ES2023,
module: ts.ModuleKind.ESNext,
moduleResolution: ts.ModuleResolutionKind.Bundler,
}
Expand Down

0 comments on commit fec7d37

Please sign in to comment.