added tns-core-modules.es2016.d.ts for declarations references

This commit is contained in:
NickIliev
2016-09-27 11:36:12 +03:00
parent c9b859e233
commit a4916d7246
4 changed files with 15 additions and 0 deletions

View File

@@ -113,6 +113,7 @@ module.exports = function(grunt) {
"!**/*.ios.d.ts", "!**/*.ios.d.ts",
"!tns-core-modules.d.ts", "!tns-core-modules.d.ts",
"!tns-core-modules.es6.d.ts", "!tns-core-modules.es6.d.ts",
"!tns-core-modules.es2016.d.ts",
"!tns-core-modules.base.d.ts", "!tns-core-modules.base.d.ts",
"!references.d.ts" "!references.d.ts"
].concat(localCfg.defaultExcludes).concat(es6Excludes).concat(angularExcludes)); ].concat(localCfg.defaultExcludes).concat(es6Excludes).concat(angularExcludes));
@@ -171,6 +172,7 @@ module.exports = function(grunt) {
"!tns-core-modules/libjs.d.ts", "!tns-core-modules/libjs.d.ts",
"!tns-core-modules/lib.core.es6.d.ts", "!tns-core-modules/lib.core.es6.d.ts",
"!tns-core-modules/lib.dom.d.ts", "!tns-core-modules/lib.dom.d.ts",
"!tns-core-modules.es2016.d.ts",
"!tns-platform-declarations/**/*" "!tns-platform-declarations/**/*"
]); ]);
localCfg.srcTsdFiles = [ localCfg.srcTsdFiles = [

View File

@@ -0,0 +1,5 @@
/// <reference path="./tns-core-modules.base.d.ts" />
/// <reference path="./module.d.ts" />
/// <reference path="./lib.dom.d.ts" />
// Use this .d.ts with TypeScript 2+ and compiler options "lib": ["es2016"]

View File

@@ -21,6 +21,8 @@ Consider the following settings in your `tsconfig.json`:
And add to the reference.d.ts: And add to the reference.d.ts:
``` ```
/// <reference path="./node_modules/tns-core-modules/tns-core-modules.es2016.d.ts" /> Needed for autocompletion and compilation.
/// <reference path="./node_modules/tns-platform-declarations/ios.d.ts" /> /// <reference path="./node_modules/tns-platform-declarations/ios.d.ts" />
/// <reference path="./node_modules/tns-platform-declarations/android.d.ts" /> /// <reference path="./node_modules/tns-platform-declarations/android.d.ts" />
``` ```

View File

@@ -1,6 +1,12 @@
{ {
"name": "tns-platform-declarations", "name": "tns-platform-declarations",
"version": "2.4.0", "version": "2.4.0",
"nativescript": {
"platforms": {
"ios": "2.4.0",
"android": "2.4.0"
}
},
"description": "Platform-specific TypeScript declarations for NativeScript for accessing native objects", "description": "Platform-specific TypeScript declarations for NativeScript for accessing native objects",
"main": "", "main": "",
"scripts": { "scripts": {