Skip to content
/ pilot Public

A TypeScript wrapper for type-checking Gecko javascript

Notifications You must be signed in to change notification settings

zombie/pilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Pilot 👩‍✈️

A TypeScript wrapper for type-checking Gecko javascript

What

A drop-in replacement for typescript that adds basic JSM support:

  • teaches it that *.jsm files are JS "modules",
  • recognizes EXPORTED_SYMBOLS as exports statements,
  • declares local variables from a few Cu.defineLazyXXX() methods.

How

The implementation (inspired by ttypescript) is a wrapper around TS which requires() original modules and patches the exported ts namespace object with custom intercept methods to support JSMs.

Typescript doesn't support custom plugins, maintaining forks is a treadmill, so a shim that only intercepts and uses a few public methods seemed like the best alternative.

Use

Clone, npm install, add *.jsm to your tsconfig and use as regular tsc:

node d:/git/pilot/lib/tsc -p tsconfig.json

or configure VS Code by pointing at the tsserver in user settings:

"typescript.tsdk": "d:/git/pilot/lib/"

License

MIT

About

A TypeScript wrapper for type-checking Gecko javascript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published