jscodeshift(callback)

Runs jscodeshift transformation on the file.

Parameters

callback
CallbackFunction
required
import 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.