Skip to content
Kitbay

experience-lwc-typescript-migrate

Apache-2.0Updated on Nov 6, 20261,156GitHub starsIncludes scripts

A Salesforce skill for converting an existing JavaScript Lightning Web Component to TypeScript.

What the skill teaches

A Salesforce skill for converting an existing JavaScript Lightning Web Component to TypeScript. The agent reads the component, renames the file with git mv so history is kept, adds type annotations based on bundled pattern files, and writes a declaration file limited to the properties and methods marked @api. It then compiles with tsc and runs the tests, finishing with a checklist of the expected bundle shape. A bundled shell script finds other components that use the one being converted. It needs git, jq and the TypeScript compiler and is not meant for writing new components.

Capabilities

  • Rename LWC JavaScript files to TypeScript with git mv
  • Add type annotations to a component
  • Generate a .d.ts file for the @api surface
  • Find components that consume the converted one