Skip to content

Commit

Permalink
chore: fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoppippi committed Dec 3, 2024
1 parent 13a36da commit f2f383d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/unplugin-typia/src/core/typia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export async function transformTypia(
* @param tsconfigId - The tsconfig.json path. @default undefined
*/
async function getTsCompilerOption(cacheEnable = true, tsconfigId?: string): Promise<ts.CompilerOptions> {
const parseTsComilerOptions = async () => {
const parseTsCompilerOptions = async () => {
const readFile = (path: string) => ts.sys.readFile(path);
const id = (tsconfigId != null) ? resolve(tsconfigId) : await resolveTSConfig();

Expand All @@ -81,10 +81,10 @@ async function getTsCompilerOption(cacheEnable = true, tsconfigId?: string): Pro

/** parse tsconfig compilerOptions */
if (cacheEnable) {
compilerOptions ??= await parseTsComilerOptions();
compilerOptions ??= await parseTsCompilerOptions();
}
else {
compilerOptions = await parseTsComilerOptions();
compilerOptions = await parseTsCompilerOptions();
}

return compilerOptions;
Expand Down
2 changes: 2 additions & 0 deletions packages/unplugin-typia/tests/rollup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ async function transform(_id: ID) {
const result = await rollupBuild(
id,
[
// @ts-expect-error type does not match
UnpluginInlineTypia({
cache: false,
log: false,
}),
// @ts-expect-error type does not match
RollupEsbuildPlugin(),
{
name: 'test:mod-options',
Expand Down

0 comments on commit f2f383d

Please sign in to comment.