MCPcopy Create free account
hub / github.com/chakra-ui/panda / normalizeCompilerOptions

Function normalizeCompilerOptions

packages/parser/src/project.ts:24–28  ·  view source on GitHub ↗
(raw: ts.CompilerOptions | undefined)

Source from the content-addressed store, hash-verified

22// TS 6.0 rejects raw JSON compiler options (e.g. `target: "ESNext"`) in createProgram.
23// They must be normalized to numeric enum values via TypeScript's own parser API first.
24const normalizeCompilerOptions = (raw: ts.CompilerOptions | undefined): ts.CompilerOptions => {
25 if (!raw) return {}
26 const { options } = ts.convertCompilerOptionsFromJson(raw, process.cwd())
27 return options
28}
29
30const createTsProject = (options: Partial<TsProjectOptions>) =>
31 new TsProject({

Callers 1

createTsProjectFunction · 0.85

Calls 1

cwdMethod · 0.65

Tested by

no test coverage detected