mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Upgrade to TypeScript 2.1, and latest grunt-ts. (#3609)
* Upgrade to TypeScript 2.1, and latest grunt-ts. * Remove AudioBuffer and UIEvent from the definitions, we now should be compatible with dom * Update the tns-platform-declarations readme
This commit is contained in:
committed by
Hristo Deshev
parent
513aeaa47b
commit
489be1e460
26
tns-core-modules/declarations.d.ts
vendored
26
tns-core-modules/declarations.d.ts
vendored
@@ -42,6 +42,24 @@ declare class Headers {
|
||||
set(name: string, value: string): void;
|
||||
}
|
||||
|
||||
interface Blob {
|
||||
readonly size: number;
|
||||
readonly type: string;
|
||||
msClose(): void;
|
||||
msDetachStream(): any;
|
||||
slice(start?: number, end?: number, contentType?: string): Blob;
|
||||
}
|
||||
|
||||
declare var Blob: {
|
||||
prototype: Blob;
|
||||
new (blobParts?: any[], options?: BlobPropertyBag): Blob;
|
||||
}
|
||||
|
||||
interface BlobPropertyBag {
|
||||
type?: string;
|
||||
endings?: string;
|
||||
}
|
||||
|
||||
declare class Body {
|
||||
bodyUsed: boolean;
|
||||
/*
|
||||
@@ -80,10 +98,6 @@ declare type RequestInfo = Request|string;
|
||||
|
||||
declare function fetch(url: string, init?: RequestInit): Promise<Response>;
|
||||
|
||||
interface XMLHttpRequest {
|
||||
send(data?: FormData): void;
|
||||
}
|
||||
|
||||
interface Console {
|
||||
time(reportName: string): void;
|
||||
timeEnd(reportName: string): void;
|
||||
@@ -166,3 +180,7 @@ declare var exports: any;
|
||||
interface Array<T> {
|
||||
filter<U extends T>(pred: (a: T) => a is U): U[];
|
||||
}
|
||||
|
||||
//Dialogs
|
||||
declare function alert(message?: any): void;
|
||||
declare function confirm(message?: string): boolean;
|
||||
|
||||
Reference in New Issue
Block a user