Resolve custom typings with typescript 2.0

I am struggling with this as well. Haven’t gotten it to work yet. Can you be more specific about what “I moved my previously made custom typings in to the node_modules/@types folder” means?

I previously created my typings following the suggestion in this thread, by adding types explicitly to the main.d.ts file in the typings folder. My file (in Ionic 2 beta) looks like this:

/// < reference path="globals/es6-shim/index.d.ts" />

interface Window {
	plugins: any;
    dgram: any;
    networkinterface: any;
}

There is also a globals folder with the referenced es6-shim in the same typings folder.

However, in the new RC0 template, first of all the @types folder doesn’t exist in my node_modules folder – and just moving all the files from my “typings” folder into a “@types” folder that I created myself doesn’t seem to work.

Any thoughts?

1 Like