Code transformation
jscodeshift
jscodeshift(callback)
Runs jscodeshift transformation on the file.
Parameters
callback
CallbackFunction
requiredimport type { API, FileInfo, Options } from "jscodeshift"
type CallbackFunction =
(file: FileInfo, api: API, options: Options) => Promise<void> | void
Callback replicates jscodeshift API, so any codemod created with jscodeshift can be used here.