1.2.0 • Published 2 months ago

jscodeshift-ts-satisfies v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

jscodeshift-ts-satisfies

npm NPM npm GitHub issues semantic-release: angular

jscodeshift-ts-satisfies is a codemod for jscodeshift that transforms type annotations to use the satisfies keyword available in TypeScript 4.9 and later.

Installation

Before using the codemod script, make sure you have jscodeshift installed. You can do this using the following command:

npm install -g jscodeshift jscodeshift-ts-satisfies

Usage

To apply the codemod to all TypeScript files in the stories directory, you can use the following command:

jscodeshift -t node_modules/jscodeshift-ts-satisfies/src/ts-satisfies.ts stories/**/*.ts

Options

--types

You have the option to specify the types that should undergo transformation using the --types flag. Here's an example:

jscodeshift -t node_modules/jscodeshift-ts-satisfies/src/ts-satisfies.ts stories/**/*.ts --types=Meta --types=StoryObj --types=Story
1.2.0

2 months ago

1.1.4

9 months ago

1.1.3

9 months ago

1.1.2

9 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago