| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 79e6881 commit ef4eb89
23 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,4 +2,7 @@ | |||
| 2 | 2 | /// <reference path="../tns-platform-declarations/ios.d.ts" /> | |
| 3 | 3 | ||
| 4 | 4 | /// <reference path="../tns-core-modules/tns-core-modules.d.ts" /> | |
| 5 | + /// <reference path="../tns-core-modules/lib.core.d.ts" /> | ||
| 6 | + /// <reference path="../tns-core-modules/lib.dom.d.ts" /> | ||
| 7 | + | ||
| 5 | 8 | /// <reference path="../tns-core-modules/ui/styling/css-selector-parser.d.ts" /> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -91,6 +91,15 @@ module.exports = function(grunt) { | |||
| 91 | 91 | var angularExcludes = angularConflicts.map(function(file) { | |
| 92 | 92 | return '!' + file; | |
| 93 | 93 | }); | |
| 94 | + var nonES6Files = [ | ||
| 95 | + 'es-collections.d.ts', | ||
| 96 | + 'es6-promise.d.ts', | ||
| 97 | + 'es6.d.ts', | ||
| 98 | + 'weakmap.d.ts', | ||
| 99 | + ]; | ||
| 100 | + var es6Excludes = nonES6Files.map(function(file) { | ||
| 101 | + return '!' + file; | ||
| 102 | + }); | ||
| 94 | 103 | var dtsFiles = grunt.file.expand({cwd: srcDir }, [ | |
| 95 | 104 | "**/*.d.ts", | |
| 96 | 105 | //Exclude the d.ts files in the apps folder - these are part of the apps and are already packed there! | |
@@ -108,13 +117,13 @@ module.exports = function(grunt) { | |||
| 108 | 117 | "!tns-core-modules.base.d.ts", | |
| 109 | 118 | "!references.d.ts", | |
| 110 | 119 | "!webworker.es2016.d.ts" | |
| 111 | - ].concat(localCfg.defaultExcludes).concat(angularExcludes)); | ||
| 120 | + ].concat(localCfg.defaultExcludes).concat(es6Excludes).concat(angularExcludes)); | ||
| 112 | 121 | dtsFiles.sort(); | |
| 113 | 122 | ||
| 114 | 123 | writeDtsFile(dtsFiles, outDir, 'tns-core-modules/tns-core-modules.base.d.ts'); | |
| 115 | 124 | var es6Files = angularConflicts.concat(['tns-core-modules.base.d.ts']); | |
| 116 | 125 | writeDtsFile(es6Files, outDir, 'tns-core-modules/tns-core-modules.es6.d.ts'); | |
| 117 | - var allFiles = angularConflicts.concat(['tns-core-modules.base.d.ts']); | ||
| 126 | + var allFiles = angularConflicts.concat(nonES6Files).concat(['tns-core-modules.base.d.ts']); | ||
| 118 | 127 | writeDtsFile(allFiles, outDir, 'tns-core-modules/tns-core-modules.d.ts'); | |
| 119 | 128 | } | |
| 120 | 129 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,11 +16,13 @@ | |||
| 16 | 16 | "grunt-env": "0.4.4", | |
| 17 | 17 | "grunt-exec": "1.0.1", | |
| 18 | 18 | "grunt-mkdir": "1.0.0", | |
| 19 | + "grunt-multi-dest": "1.0.0", | ||
| 19 | 20 | "grunt-shell": "2.1.0", | |
| 20 | - "grunt-ts": "6.0.0-beta.11", | ||
| 21 | 21 | "grunt-simple-mocha": "0.4.1", | |
| 22 | + "grunt-ts": "5.3.2", | ||
| 22 | 23 | "grunt-tslint": "4.0.0", | |
| 23 | 24 | "grunt-typedoc": "0.2.4", | |
| 25 | + "grunt-untar": "0.0.1", | ||
| 24 | 26 | "http-server": "^0.9.0", | |
| 25 | 27 | "markdown-snippet-injector": "0.1.1", | |
| 26 | 28 | "mocha": "2.2.5", | |
@@ -29,7 +31,7 @@ | |||
| 29 | 31 | "time-grunt": "1.3.0", | |
| 30 | 32 | "tslint": "^4.4.2", | |
| 31 | 33 | "typedoc": "0.4.5", | |
| 32 | - "typescript": "~2.1.5" | ||
| 34 | + "typescript": "~2.0.10" | ||
| 33 | 35 | }, | |
| 34 | 36 | "scripts": { | |
| 35 | 37 | "setup": "npm run dev-link-tns-platform-declarations && npm run dev-link-tns-core-modules && npm run dev-link-tests && npm run dev-link-apps", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,6 @@ import {Label} from "ui/label"; | |||
| 5 | 5 | import {StackLayout} from "ui/layouts/stack-layout"; | |
| 6 | 6 | import colorModule = require("color"); | |
| 7 | 7 | import enums = require("ui/enums"); | |
| 8 | - import { AnimationPromise } from "ui/animation"; | ||
| 9 | 8 | ||
| 10 | 9 | // >> animation-require | |
| 11 | 10 | import animation = require("ui/animation"); | |
@@ -106,7 +105,7 @@ export function test_CancellingAnimate(done) { | |||
| 106 | 105 | } | |
| 107 | 106 | // << (hide) | |
| 108 | 107 | }); | |
| 109 | - (<AnimationPromise>animation1).cancel(); | ||
| 108 | + animation1.cancel(); | ||
| 110 | 109 | // << animation-cancel2 | |
| 111 | 110 | } | |
| 112 | 111 | ||
@@ -485,4 +484,4 @@ function assertIOSNativeTransformIsCorrect(view: viewModule.View) { | |||
| 485 | 484 | TKUnit.assert(false, errorMessage); | |
| 486 | 485 | } | |
| 487 | 486 | } | |
| 488 | - } | ||
| 487 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,7 +9,7 @@ | |||
| 9 | 9 | "version": "2.4.0" | |
| 10 | 10 | }, | |
| 11 | 11 | "tns-android": { | |
| 12 | - "version": "2.5.0" | ||
| 12 | + "version": "2.4.1" | ||
| 13 | 13 | } | |
| 14 | 14 | }, | |
| 15 | 15 | "dependencies": { | |
@@ -24,4 +24,4 @@ | |||
| 24 | 24 | "lazy": "1.0.11", | |
| 25 | 25 | "typescript": "~2.0.10" | |
| 26 | 26 | } | |
| 27 | - } | ||
| 27 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,4 +2,7 @@ | |||
| 2 | 2 | /// <reference path="../tns-platform-declarations/ios.d.ts" /> | |
| 3 | 3 | ||
| 4 | 4 | /// <reference path="../tns-core-modules/tns-core-modules.d.ts" /> | |
| 5 | + /// <reference path="../tns-core-modules/lib.core.d.ts" /> | ||
| 6 | + /// <reference path="../tns-core-modules/lib.dom.d.ts" /> | ||
| 7 | + | ||
| 5 | 8 | /// <reference path="../tns-core-modules/ui/styling/css-selector-parser.d.ts" /> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -42,24 +42,6 @@ declare class Headers { | |||
| 42 | 42 | set(name: string, value: string): void; | |
| 43 | 43 | } | |
| 44 | 44 | ||
| 45 | - interface Blob { | ||
| 46 | - readonly size: number; | ||
| 47 | - readonly type: string; | ||
| 48 | - msClose(): void; | ||
| 49 | - msDetachStream(): any; | ||
| 50 | - slice(start?: number, end?: number, contentType?: string): Blob; | ||
| 51 | - } | ||
| 52 | - | ||
| 53 | - declare var Blob: { | ||
| 54 | - prototype: Blob; | ||
| 55 | - new (blobParts?: any[], options?: BlobPropertyBag): Blob; | ||
| 56 | - } | ||
| 57 | - | ||
| 58 | - interface BlobPropertyBag { | ||
| 59 | - type?: string; | ||
| 60 | - endings?: string; | ||
| 61 | - } | ||
| 62 | - | ||
| 63 | 45 | declare class Body { | |
| 64 | 46 | bodyUsed: boolean; | |
| 65 | 47 | /* | |
@@ -98,6 +80,10 @@ declare type RequestInfo = Request|string; | |||
| 98 | 80 | ||
| 99 | 81 | declare function fetch(url: string, init?: RequestInit): Promise<Response>; | |
| 100 | 82 | ||
| 83 | + interface XMLHttpRequest { | ||
| 84 | + send(data?: FormData): void; | ||
| 85 | + } | ||
| 86 | + | ||
| 101 | 87 | interface Console { | |
| 102 | 88 | time(reportName: string): void; | |
| 103 | 89 | timeEnd(reportName: string): void; | |
@@ -180,7 +166,3 @@ declare var exports: any; | |||
| 180 | 166 | interface Array<T> { | |
| 181 | 167 | filter<U extends T>(pred: (a: T) => a is U): U[]; | |
| 182 | 168 | } | |
| 183 | - | ||
| 184 | - //Dialogs | ||
| 185 | - declare function alert(message?: any): void; | ||
| 186 | - declare function confirm(message?: string): boolean; | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,61 @@ | |||
| 1 | + /* tslint:disable */ | ||
| 2 | + ///////////////////////////// | ||
| 3 | + /// IE11 ECMAScript Extensions | ||
| 4 | + ///////////////////////////// | ||
| 5 | + | ||
| 6 | + interface List<T> extends Array<T> {} | ||
| 7 | + | ||
| 8 | + interface Map<K, V> { | ||
| 9 | + clear(): void; | ||
| 10 | + delete(key: K): boolean; | ||
| 11 | + forEach(callbackfn: (value: V, index: K, map: Map<K, V>) => void, thisArg?: any): void; | ||
| 12 | + get(key: K): V; | ||
| 13 | + has(key: K): boolean; | ||
| 14 | + set(key: K, value: V): Map<K, V>; | ||
| 15 | + size: number; | ||
| 16 | + keys(): Array<K>; | ||
| 17 | + values(): Array<V>; | ||
| 18 | + } | ||
| 19 | + declare var Map: { | ||
| 20 | + new <K, V>(): Map<K, V>; | ||
| 21 | + | ||
| 22 | + // needed by Angular | ||
| 23 | + // alexeagle: PATCHED | ||
| 24 | + new<K, V>(m: Map<K, V>): Map<K, V>; | ||
| 25 | + new<K, V>(l: List<any>): Map<K, V>; | ||
| 26 | + prototype: Map<any, any>; | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + //For compatibility - some libs insist on the Map/Set types being named that way | ||
| 30 | + declare type MapConstructor = typeof Map; | ||
| 31 | + declare type SetConstructor = typeof Set; | ||
| 32 | + | ||
| 33 | + interface Set<T> { | ||
| 34 | + add(value: T): Set<T>; | ||
| 35 | + clear(): void; | ||
| 36 | + delete(value: T): boolean; | ||
| 37 | + forEach(callbackfn: (value: T, index: T, set: Set<T>) => void, thisArg?: any): void; | ||
| 38 | + has(value: T): boolean; | ||
| 39 | + size: number; | ||
| 40 | + } | ||
| 41 | + declare var Set: { | ||
| 42 | + new <T>(): Set<T>; | ||
| 43 | + | ||
| 44 | + // needed by Angular | ||
| 45 | + // alexeagle PATCHED | ||
| 46 | + new<T>(s: Set<T>): Set<T>; | ||
| 47 | + new<T>(l: List<T>): Set<T>; | ||
| 48 | + prototype: Set<any>; | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + //Compatibility interfaces for rxjs | ||
| 52 | + interface IteratorResult<T> { | ||
| 53 | + done: boolean; | ||
| 54 | + value?: T; | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + interface Iterator<T> { | ||
| 58 | + next(value?: any): IteratorResult<T>; | ||
| 59 | + return?(value?: any): IteratorResult<T>; | ||
| 60 | + throw?(e?: any): IteratorResult<T>; | ||
| 61 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,146 @@ | |||
| 1 | + /* tslint:disable */ | ||
| 2 | + // Type definitions for es6-promise | ||
| 3 | + // Project: https://github.com/jakearchibald/ES6-Promise | ||
| 4 | + // Definitions by: François de Campredon <https://github.com/fdecampredon/> | ||
| 5 | + // Definitions: https://github.com/borisyankov/DefinitelyTyped | ||
| 6 | + interface PromiseLike<T> { | ||
| 7 | + then<U>(onFulfilled?: (value: T) => PromiseLike<U>, onRejected?: (error: any) => PromiseLike<U>): PromiseLike<U>; | ||
| 8 | + then<U>(onFulfilled?: (value: T) => PromiseLike<U>, onRejected?: (error: any) => U): PromiseLike<U>; | ||
| 9 | + then<U>(onFulfilled?: (value: T) => PromiseLike<U>, onRejected?: (error: any) => void): PromiseLike<U>; | ||
| 10 | + then<U>(onFulfilled?: (value: T) => U, onRejected?: (error: any) => PromiseLike<U>): PromiseLike<U>; | ||
| 11 | + then<U>(onFulfilled?: (value: T) => U, onRejected?: (error: any) => U): PromiseLike<U>; | ||
| 12 | + then<U>(onFulfilled?: (value: T) => U, onRejected?: (error: any) => void): PromiseLike<U>; | ||
| 13 | + } | ||
| 14 | + | ||
| 15 | + interface Promise<T> extends PromiseLike<T> { | ||
| 16 | + /** | ||
| 17 | + * onFulfilled is called when/if "promise" resolves. onRejected is called when/if "promise" rejects. | ||
| 18 | + * Both are optional, if either/both are omitted the next onFulfilled/onRejected in the chain is called. | ||
| 19 | + * Both callbacks have a single parameter , the fulfillment value or rejection reason. | ||
| 20 | + * "then" returns a new promise equivalent to the value you return from onFulfilled/onRejected after being passed through Promise.resolve. | ||
| 21 | + * If an error is thrown in the callback, the returned promise rejects with that error. | ||
| 22 | + * @param onFulfilled called when/if "promise" resolves | ||
| 23 | + * @param onRejected called when/if "promise" rejects | ||
| 24 | + */ | ||
| 25 | + then<U>(onFulfilled?: (value: T) => PromiseLike<U>, onRejected?: (error: any) => PromiseLike<U>): Promise<U>; | ||
| 26 | + /** | ||
| 27 | + * onFulfilled is called when/if "promise" resolves. onRejected is called when/if "promise" rejects. | ||
| 28 | + * Both are optional, if either/both are omitted the next onFulfilled/onRejected in the chain is called. | ||
| 29 | + * Both callbacks have a single parameter , the fulfillment value or rejection reason. | ||
| 30 | + * "then" returns a new promise equivalent to the value you return from onFulfilled/onRejected after being passed through Promise.resolve. | ||
| 31 | + * If an error is thrown in the callback, the returned promise rejects with that error. | ||
| 32 | + * @param onFulfilled called when/if "promise" resolves | ||
| 33 | + * @param onRejected called when/if "promise" rejects | ||
| 34 | + */ | ||
| 35 | + then<U>(onFulfilled?: (value: T) => PromiseLike<U>, onRejected?: (error: any) => U): Promise<U>; | ||
| 36 | + /** | ||
| 37 | + * onFulfilled is called when/if "promise" resolves. onRejected is called when/if "promise" rejects. | ||
| 38 | + * Both are optional, if either/both are omitted the next onFulfilled/onRejected in the chain is called. | ||
| 39 | + * Both callbacks have a single parameter , the fulfillment value or rejection reason. | ||
| 40 | + * "then" returns a new promise equivalent to the value you return from onFulfilled/onRejected after being passed through Promise.resolve. | ||
| 41 | + * If an error is thrown in the callback, the returned promise rejects with that error. | ||
| 42 | + * @param onFulfilled called when/if "promise" resolves | ||
| 43 | + * @param onRejected called when/if "promise" rejects | ||
| 44 | + */ | ||
| 45 | + then<U>(onFulfilled?: (value: T) => PromiseLike<U>, onRejected?: (error: any) => void): Promise<U>; | ||
| 46 | + /** | ||
| 47 | + * onFulfilled is called when/if "promise" resolves. onRejected is called when/if "promise" rejects. | ||
| 48 | + * Both are optional, if either/both are omitted the next onFulfilled/onRejected in the chain is called. | ||
| 49 | + * Both callbacks have a single parameter , the fulfillment value or rejection reason. | ||
| 50 | + * "then" returns a new promise equivalent to the value you return from onFulfilled/onRejected after being passed through Promise.resolve. | ||
| 51 | + * If an error is thrown in the callback, the returned promise rejects with that error. | ||
| 52 | + * @param onFulfilled called when/if "promise" resolves | ||
| 53 | + * @param onRejected called when/if "promise" rejects | ||
| 54 | + */ | ||
| 55 | + then<U>(onFulfilled?: (value: T) => U, onRejected?: (error: any) => PromiseLike<U>): Promise<U>; | ||
| 56 | + /** | ||
| 57 | + * onFulfilled is called when/if "promise" resolves. onRejected is called when/if "promise" rejects. | ||
| 58 | + * Both are optional, if either/both are omitted the next onFulfilled/onRejected in the chain is called. | ||
| 59 | + * Both callbacks have a single parameter , the fulfillment value or rejection reason. | ||
| 60 | + * "then" returns a new promise equivalent to the value you return from onFulfilled/onRejected after being passed through Promise.resolve. | ||
| 61 | + * If an error is thrown in the callback, the returned promise rejects with that error. | ||
| 62 | + * @param onFulfilled called when/if "promise" resolves | ||
| 63 | + * @param onRejected called when/if "promise" rejects | ||
| 64 | + */ | ||
| 65 | + then<U>(onFulfilled?: (value: T) => U, onRejected?: (error: any) => U): Promise<U>; | ||
| 66 | + /** | ||
| 67 | + * onFulfilled is called when/if "promise" resolves. onRejected is called when/if "promise" rejects. | ||
| 68 | + * Both are optional, if either/both are omitted the next onFulfilled/onRejected in the chain is called. | ||
| 69 | + * Both callbacks have a single parameter , the fulfillment value or rejection reason. | ||
| 70 | + * "then" returns a new promise equivalent to the value you return from onFulfilled/onRejected after being passed through Promise.resolve. | ||
| 71 | + * If an error is thrown in the callback, the returned promise rejects with that error. | ||
| 72 | + * @param onFulfilled called when/if "promise" resolves | ||
| 73 | + * @param onRejected called when/if "promise" rejects | ||
| 74 | + */ | ||
| 75 | + then<U>(onFulfilled?: (value: T) => U, onRejected?: (error: any) => void): Promise<U>; | ||
| 76 | + | ||
| 77 | + /** | ||
| 78 | + * Sugar for promise.then(undefined, onRejected) | ||
| 79 | + * @param onRejected called when/if "promise" rejects | ||
| 80 | + */ | ||
| 81 | + catch<U>(onRejected?: (error: any) => PromiseLike<U>): Promise<U>; | ||
| 82 | + /** | ||
| 83 | + * Sugar for promise.then(undefined, onRejected) | ||
| 84 | + * @param onRejected called when/if "promise" rejects | ||
| 85 | + */ | ||
| 86 | + catch<U>(onRejected?: (error: any) => U): Promise<U>; | ||
| 87 | + /** | ||
| 88 | + * Sugar for promise.then(undefined, onRejected) | ||
| 89 | + * @param onRejected called when/if "promise" rejects | ||
| 90 | + */ | ||
| 91 | + catch<U>(onRejected?: (error: any) => void): Promise<U>; | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | + interface PromiseConstructor { | ||
| 95 | + /** | ||
| 96 | + * A reference to the prototype. | ||
| 97 | + */ | ||
| 98 | + prototype: Promise<any>; | ||
| 99 | + | ||
| 100 | + /** | ||
| 101 | + * Creates a new Promise. | ||
| 102 | + * @param executor A callback used to initialize the promise. This callback is passed two arguments: | ||
| 103 | + * a resolve callback used resolve the promise with a value or the result of another promise, | ||
| 104 | + * and a reject callback used to reject the promise with a provided reason or error. | ||
| 105 | + */ | ||
| 106 | + new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>; | ||
| 107 | + | ||
| 108 | + /** | ||
| 109 | + * Returns promise (only if promise.constructor == Promise) | ||
| 110 | + */ | ||
| 111 | + cast<T>(promise: Promise<T>): Promise<T>; | ||
| 112 | + /** | ||
| 113 | + * Make a promise that fulfills to obj. | ||
| 114 | + */ | ||
| 115 | + cast<T>(object: T): Promise<T>; | ||
| 116 | + | ||
| 117 | + /** | ||
| 118 | + * Make a new promise from the PromiseLike. | ||
| 119 | + * A promise-like can be anything as far as it has a "then" method. | ||
| 120 | + * This also creates a new promise if you pass it a genuine JavaScript promise, making it less efficient for casting than Promise.cast. | ||
| 121 | + */ | ||
| 122 | + resolve<T>(promise?: PromiseLike<T>): Promise<T>; | ||
| 123 | + /** | ||
| 124 | + * Make a promise that fulfills to obj. Same as Promise.cast(obj) in this situation. | ||
| 125 | + */ | ||
| 126 | + resolve<T>(object?: T): Promise<T>; | ||
| 127 | + | ||
| 128 | + /** | ||
| 129 | + * Make a promise that rejects to obj. For consistency and debugging (eg stack traces), obj should be an instanceof Error | ||
| 130 | + */ | ||
| 131 | + reject(error: any): Promise<any>; | ||
| 132 | + | ||
| 133 | + /** | ||
| 134 | + * Make a promise that fulfills when every item in the array fulfills, and rejects if (and when) any item rejects. | ||
| 135 | + * the array passed to all can be a mixture of promise-like objects and other objects. | ||
| 136 | + * The fulfillment value is an array (in order) of fulfillment values. The rejection value is the first rejection value. | ||
| 137 | + */ | ||
| 138 | + all<T>(promises: Promise<T>[]): Promise<T[]>; | ||
| 139 | + | ||
| 140 | + /** | ||
| 141 | + * Make a Promise that fulfills when any item fulfills, and rejects if any item rejects. | ||
| 142 | + */ | ||
| 143 | + race<T>(promises: Promise<T>[]): Promise<T>; | ||
| 144 | + } | ||
| 145 | + | ||
| 146 | + declare var Promise: PromiseConstructor; | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,12 @@ | |||
| 1 | + interface Symbol { | ||
| 2 | + toString(): string; | ||
| 3 | + valueOf(): Object; | ||
| 4 | + } | ||
| 5 | + | ||
| 6 | + interface SymbolConstructor { | ||
| 7 | + prototype: Symbol; | ||
| 8 | + (description?: string | number): symbol; | ||
| 9 | + iterator: symbol; | ||
| 10 | + } | ||
| 11 | + | ||
| 12 | + declare var Symbol: SymbolConstructor; | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments