Files
NativeScript/tns-platform-declarations/README.md
Nick Iliev 923a7c7813 updated instructions for tns-platform-declarations (#4496)
* updated instructions for tns-platform-declarations

* fixed TypeScrtip recommended version
2017-07-04 10:41:41 +03:00

30 lines
901 B
Markdown

This plugin contains type information about the native platforms as exposed by the NativeScript framework.
Offically supported entry points:
- `android.d.ts` - For android SDK and runtime types.
- `ios.d.ts` - For iOS SDK and runtime types.
Using the declarations may conflict with DOM typings,
consider using TypeScript 2.x.x and the following settings in your `tsconfig.json`:
```
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"experimentalDecorators": true,
"lib": [
"es6",
"dom"
]
}
}
```
Create `reference.d.ts`and add the following content:
```
/// <reference path="./node_modules/tns-platform-declarations/ios.d.ts" />
/// <reference path="./node_modules/tns-platform-declarations/android.d.ts" />
```
d.ts files require a lot of memory and CPU. Consider adding skipLibCheck option to tsconfig file.