Hi all!
Anyone has an idea of the best way to declare my project’s types?
I’ve been reading and I know I can add this on my package.json:
"typings": "./app/app.d.ts"
but I wonder what are the best practices here.
I would like to have a separated GIT project with them, to be used by other typescript code if needed, and I’m full of doubts on how to write the file(s), with namespaces like NodeJS’ .d.ts:
I’ve started to organize my models and interfaces on a single folder to be able to outsource them in a separated repo later.
Reading this: http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html I thought we’re able to define our module and use across our package (Ionic 2 app) but it seems it only works for external modules (on node_modules/), so I referenced manually my index.d.ts on the ionicapp/typings/index.d.ts and it seems to work now
What’s your method to let the TS compiler to resolve your definitions @itlr?