Skip to content

Commit

Permalink
flow type error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
p0nch000 committed Dec 17, 2024
1 parent 2ffdd78 commit eb2935f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/babel-plugin/src/utils/state-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ export default class StateManager {
const packageJsonPath = path.join(projectDir, 'package.json');
if (fs.existsSync(packageJsonPath)) {
const rawConfig = JSON5.parse(fs.readFileSync(packageJsonPath, 'utf8'));
const packageJson = (rawConfig: any) as PackageJSON;
const packageJson: PackageJSON = (rawConfig: any);

// Handle Node.js native imports
const imports = packageJson.imports;
Expand All @@ -662,7 +662,7 @@ export default class StateManager {
const tsconfigPath = path.join(projectDir, 'tsconfig.json');
if (fs.existsSync(tsconfigPath)) {
const rawConfig = JSON5.parse(fs.readFileSync(tsconfigPath, 'utf8'));
const tsconfig = (rawConfig: any) as TSConfig;
const tsconfig: TSConfig = (rawConfig: any);
const baseUrl = tsconfig.compilerOptions?.baseUrl || '.';
if (tsconfig.compilerOptions?.paths) {
tsconfigAliases = Object.fromEntries(
Expand Down Expand Up @@ -694,7 +694,7 @@ export default class StateManager {
const denoConfigPath = path.join(projectDir, 'deno.json');
if (fs.existsSync(denoConfigPath)) {
const rawConfig = JSON5.parse(fs.readFileSync(denoConfigPath, 'utf8'));
const denoConfig = (rawConfig: any) as DenoConfig;
const denoConfig: DenoConfig = (rawConfig: any);
if (denoConfig.imports) {
denoAliases = Object.fromEntries(
Object.entries(denoConfig.imports).map(([key, value]) => [
Expand Down

0 comments on commit eb2935f

Please sign in to comment.