Skip to content

Commit

Permalink
chore(codemods): fix issues related to ts 5.5 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
mainframev committed Dec 20, 2024
1 parent b7abd9a commit 3ee9cbd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/codemods/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"tslib": "^2.1.0",
"react": "17.0.2",
"ts-morph": "^10.0.1",
"typescript": "5.3.3",
"glob": "^7.1.2",
"yargs": "^13.3.2"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import { runComponentToCompat, buildCompatHash, ComponentToCompat, RawCompat, getNamedExports } from './compatHelpers';
import {
runComponentToCompat,
buildCompatHash,
getNamedExports,
type RawCompat,
type ComponentToCompat as ComponentToCompatType,
} from './compatHelpers';
import { ExportMapping } from './namedExports';
import { CodeMod } from '../../types';
import { SourceFile } from 'ts-morph';
Expand All @@ -12,7 +18,7 @@ function getPath(root: string, componentName: string) {
return `${root}${componentName}`;
}

export function createComponentToCompat(comp: RawCompat): ComponentToCompat {
export function createComponentToCompat(comp: RawCompat): ComponentToCompatType {
return {
oldPath: getPath(completePath, comp.componentName),
newComponentPath: getPath(newPathStart, comp.componentName),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { CodeMod, ModResult, NoOp } from '../../../../codeMods/types';
import { CodeMod as CodeModType, ModResult, NoOp } from '../../../../codeMods/types';
import { Err } from '../../../../helpers/result';
const CodeMod: CodeMod<string> = {

const CodeMod: CodeModType<string> = {
run: () => {
return Err<ModResult, NoOp>({ logs: [] });
},
Expand Down

0 comments on commit 3ee9cbd

Please sign in to comment.