CodeKit icon indicating copy to clipboard operation
CodeKit copied to clipboard

Typescript definition files

Open speed1speed1 opened this issue 8 years ago • 4 comments

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

speed1speed1 avatar May 10 '17 10:05 speed1speed1

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

bdkjones avatar May 16 '17 01:05 bdkjones

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.

subhaze avatar Feb 25 '19 22:02 subhaze

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

bdkjones avatar Feb 25 '19 23:02 bdkjones

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.

subhaze avatar Feb 26 '19 22:02 subhaze