stackxyz / stackeye

StackEye is a chrome extension which lets user watch questions on stackoverflow and other stackexchange sites.StackEye notifies the user about any new comment/answer on watched questions.
84 stars 27 forks source link

Add basic TypeScript config #53

Closed seanf closed 5 years ago

seanf commented 5 years ago

(Run npm install to install TypeScript locally via package.json.)

If you run npm watch it will start the TypeScript compiler in watch mode, to let you know if the types are okay. You can also open the project directory in VS Code and it can mostly understand the project, including autocomplete for Chrome and jQuery APIs.

Limitations:

If we wanted to type everything, we could add more JSDoc types all over the place, but it might be easier to rename all the files to .ts and add a transpilation step (.ts to .js). We could also transpile from say ES2018 to ES5, if we wanted compatibility with really old Chrome versions for some reason.

seanf commented 5 years ago

Incorporated into https://github.com/sachinjain024/stackeye/commit/3b3c3a5e14c8e8b93cffdc29e8bdb90491bea624