bdkjones / CodeKit

CodeKit 3 Issue Tracker
https://codekitapp.com
81 stars 5 forks source link

Typescript definition files #361

Open speed1speed1 opened 7 years ago

speed1speed1 commented 7 years ago

How can I set definition files to use jquery or babylonjs?

bdkjones commented 7 years ago

I'm afraid I need more information before I can address this. I'm not a TS expert.

subhaze commented 5 years ago

Issue is a bit old but FWIW, lots of packages are shipping with definition files these days; The ones that don't can, usually, be found here http://definitelytyped.org/. Example: npm i --save-dev @types/jquery and npm i --save-dev @types/babylon should get you those types.

bdkjones commented 5 years ago

I'm still lost on what's required here because I don't use TypeScript.

subhaze commented 5 years ago

Depending on how it's integrated TS 2.x+ will automatically look in node_modules for types, so theoretically you'd just need to expose a way to npm install the packages/types from CK.

I'm not sure what context tsc is ran in but if it's able to see the current projects node_modules it should pull in types found there in during type checking.