mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
added tns-core-modules.es2016.d.ts for declarations references
This commit is contained in:
@@ -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 = [
|
||||||
|
|||||||
5
tns-core-modules/tns-core-modules.es2016.d.ts
vendored
Normal file
5
tns-core-modules/tns-core-modules.es2016.d.ts
vendored
Normal 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"]
|
||||||
@@ -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" />
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -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": {
|
||||||
|
|||||||
Reference in New Issue
Block a user