UNPKG

grunt-tsc

Version:

Compile typescript files via grunt tasks

942 lines (937 loc) 919 kB
/* ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ declare module Windows { export module Foundation { export module Collections { export enum CollectionChange { reset, itemInserted, itemRemoved, itemChanged, } export interface IVectorChangedEventArgs { collectionChange: Windows.Foundation.Collections.CollectionChange; index: number; } export interface IPropertySet extends Windows.Foundation.Collections.IObservableMap<string, any>, Windows.Foundation.Collections.IMap<string, any>, Windows.Foundation.Collections.IIterable<Windows.Foundation.Collections.IKeyValuePair<string, any>> { } export class PropertySet implements Windows.Foundation.Collections.IPropertySet, Windows.Foundation.Collections.IObservableMap<string, any>, Windows.Foundation.Collections.IMap<string, any>, Windows.Foundation.Collections.IIterable<Windows.Foundation.Collections.IKeyValuePair<string, any>> { size: number; onmapchanged: any/* TODO */; lookup(key: string): any; hasKey(key: string): boolean; getView(): Windows.Foundation.Collections.IMapView<string, any>; insert(key: string, value: any): boolean; remove(key: string): void; clear(): void; first(): Windows.Foundation.Collections.IIterator<Windows.Foundation.Collections.IKeyValuePair<string, any>>; } export interface IIterable<T> { first(): Windows.Foundation.Collections.IIterator<T>; } export interface IIterator<T> { current: T; hasCurrent: boolean; moveNext(): boolean; getMany(): { items: T[]; returnValue: number; }; } export interface IVectorView<T> extends Windows.Foundation.Collections.IIterable<T> { size: number; getAt(index: number): T; indexOf(value: T): { index: number; returnValue: boolean; }; getMany(startIndex: number): { items: T[]; returnValue: number; }; toString(): string; toLocaleString(): string; concat(...items: T[][]): T[]; join(seperator: string): string; pop(): T; push(...items: T[]): void; reverse(): T[]; shift(): T; slice(start: number): T[]; slice(start: number, end: number): T[]; sort(): T[]; sort(compareFn: (a: T, b: T) => number): T[]; splice(start: number): T[]; splice(start: number, deleteCount: number, ...items: T[]): T[]; unshift(...items: T[]): number; lastIndexOf(searchElement: T): number; lastIndexOf(searchElement: T, fromIndex: number): number; every(callbackfn: (value: T, index: number, array: T[]) => boolean): boolean; every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg: any): boolean; some(callbackfn: (value: T, index: number, array: T[]) => boolean): boolean; some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg: any): boolean; forEach(callbackfn: (value: T, index: number, array: T[]) => void ): void; forEach(callbackfn: (value: T, index: number, array: T[]) => void , thisArg: any): void; map(callbackfn: (value: T, index: number, array: T[]) => any): any[]; map(callbackfn: (value: T, index: number, array: T[]) => any, thisArg: any): any[]; filter(callbackfn: (value: T, index: number, array: T[]) => boolean): T[]; filter(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg: any): T[]; reduce(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: T[]) => any): any; reduce(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: T[]) => any, initialValue: any): any; reduceRight(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: T[]) => any): any; reduceRight(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: T[]) => any, initialValue: any): any; length: number; } export interface IVector<T> extends Windows.Foundation.Collections.IIterable<T> { size: number; getAt(index: number): T; getView(): Windows.Foundation.Collections.IVectorView<T>; indexOf(value: T): { index: number; returnValue: boolean; }; setAt(index: number, value: T): void; insertAt(index: number, value: T): void; removeAt(index: number): void; append(value: T): void; removeAtEnd(): void; clear(): void; getMany(startIndex: number): { items: T[]; returnValue: number; }; replaceAll(items: T[]): void; toString(): string; toLocaleString(): string; concat(...items: T[][]): T[]; join(seperator: string): string; pop(): T; push(...items: T[]): void; reverse(): T[]; shift(): T; slice(start: number): T[]; slice(start: number, end: number): T[]; sort(): T[]; sort(compareFn: (a: T, b: T) => number): T[]; splice(start: number): T[]; splice(start: number, deleteCount: number, ...items: T[]): T[]; unshift(...items: T[]): number; lastIndexOf(searchElement: T): number; lastIndexOf(searchElement: T, fromIndex: number): number; every(callbackfn: (value: T, index: number, array: T[]) => boolean): boolean; every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg: any): boolean; some(callbackfn: (value: T, index: number, array: T[]) => boolean): boolean; some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg: any): boolean; forEach(callbackfn: (value: T, index: number, array: T[]) => void ): void; forEach(callbackfn: (value: T, index: number, array: T[]) => void , thisArg: any): void; map(callbackfn: (value: T, index: number, array: T[]) => any): any[]; map(callbackfn: (value: T, index: number, array: T[]) => any, thisArg: any): any[]; filter(callbackfn: (value: T, index: number, array: T[]) => boolean): T[]; filter(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg: any): T[]; reduce(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: T[]) => any): any; reduce(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: T[]) => any, initialValue: any): any; reduceRight(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: T[]) => any): any; reduceRight(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: T[]) => any, initialValue: any): any; length: number; } export interface IKeyValuePair<K, V> { key: K; value: V; } export interface IMap<K, V> extends Windows.Foundation.Collections.IIterable<Windows.Foundation.Collections.IKeyValuePair<K, V>> { size: number; lookup(key: K): V; hasKey(key: K): boolean; getView(): Windows.Foundation.Collections.IMapView<K, V>; insert(key: K, value: V): boolean; remove(key: K): void; clear(): void; } export interface IMapView<K, V> extends Windows.Foundation.Collections.IIterable<Windows.Foundation.Collections.IKeyValuePair<K, V>> { size: number; lookup(key: K): V; hasKey(key: K): boolean; split(): { first: Windows.Foundation.Collections.IMapView<K, V>; second: Windows.Foundation.Collections.IMapView<K, V>; }; } export interface VectorChangedEventHandler<T> { (sender: Windows.Foundation.Collections.IObservableVector<T>, event: Windows.Foundation.Collections.IVectorChangedEventArgs): void; } export interface IObservableVector<T> extends Windows.Foundation.Collections.IVector<T>, Windows.Foundation.Collections.IIterable<T> { onvectorchanged: any/* TODO */; } export interface IMapChangedEventArgs<K> { collectionChange: Windows.Foundation.Collections.CollectionChange; key: K; } export interface MapChangedEventHandler<K, V> { (sender: Windows.Foundation.Collections.IObservableMap<K, V>, event: Windows.Foundation.Collections.IMapChangedEventArgs<K>): void; } export interface IObservableMap<K, V> extends Windows.Foundation.Collections.IMap<K, V>, Windows.Foundation.Collections.IIterable<Windows.Foundation.Collections.IKeyValuePair<K, V>> { onmapchanged: any/* TODO */; } } } } declare module Windows { export module Foundation { export interface IUriRuntimeClass { absoluteUri: string; displayUri: string; domain: string; extension: string; fragment: string; host: string; password: string; path: string; port: number; query: string; queryParsed: Windows.Foundation.WwwFormUrlDecoder; rawUri: string; schemeName: string; suspicious: boolean; userName: string; equals(pUri: Windows.Foundation.Uri): boolean; combineUri(relativeUri: string): Windows.Foundation.Uri; } export class WwwFormUrlDecoder implements Windows.Foundation.IWwwFormUrlDecoderRuntimeClass, Windows.Foundation.Collections.IIterable<Windows.Foundation.IWwwFormUrlDecoderEntry>, Windows.Foundation.Collections.IVectorView<Windows.Foundation.IWwwFormUrlDecoderEntry> { constructor(query: string); size: number; getFirstValueByName(name: string): string; first(): Windows.Foundation.Collections.IIterator<Windows.Foundation.IWwwFormUrlDecoderEntry>; getAt(index: number): Windows.Foundation.IWwwFormUrlDecoderEntry; indexOf(value: Windows.Foundation.IWwwFormUrlDecoderEntry): { index: number; returnValue: boolean; }; getMany(startIndex: number): { items: Windows.Foundation.IWwwFormUrlDecoderEntry[]; returnValue: number; }; toString(): string; toLocaleString(): string; concat(...items: Windows.Foundation.IWwwFormUrlDecoderEntry[][]): Windows.Foundation.IWwwFormUrlDecoderEntry[]; join(seperator: string): string; pop(): Windows.Foundation.IWwwFormUrlDecoderEntry; push(...items: Windows.Foundation.IWwwFormUrlDecoderEntry[]): void; reverse(): Windows.Foundation.IWwwFormUrlDecoderEntry[]; shift(): Windows.Foundation.IWwwFormUrlDecoderEntry; slice(start: number): Windows.Foundation.IWwwFormUrlDecoderEntry[]; slice(start: number, end: number): Windows.Foundation.IWwwFormUrlDecoderEntry[]; sort(): Windows.Foundation.IWwwFormUrlDecoderEntry[]; sort(compareFn: (a: Windows.Foundation.IWwwFormUrlDecoderEntry, b: Windows.Foundation.IWwwFormUrlDecoderEntry) => number): Windows.Foundation.IWwwFormUrlDecoderEntry[]; splice(start: number): Windows.Foundation.IWwwFormUrlDecoderEntry[]; splice(start: number, deleteCount: number, ...items: Windows.Foundation.IWwwFormUrlDecoderEntry[]): Windows.Foundation.IWwwFormUrlDecoderEntry[]; unshift(...items: Windows.Foundation.IWwwFormUrlDecoderEntry[]): number; lastIndexOf(searchElement: Windows.Foundation.IWwwFormUrlDecoderEntry): number; lastIndexOf(searchElement: Windows.Foundation.IWwwFormUrlDecoderEntry, fromIndex: number): number; every(callbackfn: (value: Windows.Foundation.IWwwFormUrlDecoderEntry, index: number, array: Windows.Foundation.IWwwFormUrlDecoderEntry[]) => boolean): boolean; every(callbackfn: (value: Windows.Foundation.IWwwFormUrlDecoderEntry, index: number, array: Windows.Foundation.IWwwFormUrlDecoderEntry[]) => boolean, thisArg: any): boolean; some(callbackfn: (value: Windows.Foundation.IWwwFormUrlDecoderEntry, index: number, array: Windows.Foundation.IWwwFormUrlDecoderEntry[]) => boolean): boolean; some(callbackfn: (value: Windows.Foundation.IWwwFormUrlDecoderEntry, index: number, array: Windows.Foundation.IWwwFormUrlDecoderEntry[]) => boolean, thisArg: any): boolean; forEach(callbackfn: (value: Windows.Foundation.IWwwFormUrlDecoderEntry, index: number, array: Windows.Foundation.IWwwFormUrlDecoderEntry[]) => void ): void; forEach(callbackfn: (value: Windows.Foundation.IWwwFormUrlDecoderEntry, index: number, array: Windows.Foundation.IWwwFormUrlDecoderEntry[]) => void , thisArg: any): void; map(callbackfn: (value: Windows.Foundation.IWwwFormUrlDecoderEntry, index: number, array: Windows.Foundation.IWwwFormUrlDecoderEntry[]) => any): any[]; map(callbackfn: (value: Windows.Foundation.IWwwFormUrlDecoderEntry, index: number, array: Windows.Foundation.IWwwFormUrlDecoderEntry[]) => any, thisArg: any): any[]; filter(callbackfn: (value: Windows.Foundation.IWwwFormUrlDecoderEntry, index: number, array: Windows.Foundation.IWwwFormUrlDecoderEntry[]) => boolean): Windows.Foundation.IWwwFormUrlDecoderEntry[]; filter(callbackfn: (value: Windows.Foundation.IWwwFormUrlDecoderEntry, index: number, array: Windows.Foundation.IWwwFormUrlDecoderEntry[]) => boolean, thisArg: any): Windows.Foundation.IWwwFormUrlDecoderEntry[]; reduce(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: Windows.Foundation.IWwwFormUrlDecoderEntry[]) => any): any; reduce(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: Windows.Foundation.IWwwFormUrlDecoderEntry[]) => any, initialValue: any): any; reduceRight(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: Windows.Foundation.IWwwFormUrlDecoderEntry[]) => any): any; reduceRight(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: Windows.Foundation.IWwwFormUrlDecoderEntry[]) => any, initialValue: any): any; length: number; } export class Uri implements Windows.Foundation.IUriRuntimeClass, Windows.Foundation.IUriRuntimeClassWithAbsoluteCanonicalUri { constructor(uri: string); constructor(baseUri: string, relativeUri: string); absoluteUri: string; displayUri: string; domain: string; extension: string; fragment: string; host: string; password: string; path: string; port: number; query: string; queryParsed: Windows.Foundation.WwwFormUrlDecoder; rawUri: string; schemeName: string; suspicious: boolean; userName: string; absoluteCanonicalUri: string; displayIri: string; equals(pUri: Windows.Foundation.Uri): boolean; combineUri(relativeUri: string): Windows.Foundation.Uri; static unescapeComponent(toUnescape: string): string; static escapeComponent(toEscape: string): string; } export interface IUriRuntimeClassWithAbsoluteCanonicalUri { absoluteCanonicalUri: string; displayIri: string; } export interface IUriEscapeStatics { unescapeComponent(toUnescape: string): string; escapeComponent(toEscape: string): string; } export interface IUriRuntimeClassFactory { createUri(uri: string): Windows.Foundation.Uri; createUri(baseUri: string, relativeUri: string): Windows.Foundation.Uri; } export interface IWwwFormUrlDecoderEntry { name: string; value: string; } export interface IWwwFormUrlDecoderRuntimeClass extends Windows.Foundation.Collections.IIterable<Windows.Foundation.IWwwFormUrlDecoderEntry>, Windows.Foundation.Collections.IVectorView<Windows.Foundation.IWwwFormUrlDecoderEntry> { getFirstValueByName(name: string): string; } export interface IWwwFormUrlDecoderRuntimeClassFactory { createWwwFormUrlDecoder(query: string): Windows.Foundation.WwwFormUrlDecoder; } export interface IGetActivationFactory { getActivationFactory(activatableClassId: string): any; } export interface IClosable { close(): void; } export enum PropertyType { empty, uInt8, int16, uInt16, int32, uInt32, int64, uInt64, single, double, char16, boolean, string, inspectable, dateTime, timeSpan, guid, point, size, rect, otherType, uInt8Array, int16Array, uInt16Array, int32Array, uInt32Array, int64Array, uInt64Array, singleArray, doubleArray, char16Array, booleanArray, stringArray, inspectableArray, dateTimeArray, timeSpanArray, guidArray, pointArray, sizeArray, rectArray, otherTypeArray, } export interface Point { x: number; y: number; } export interface Size { width: number; height: number; } export interface Rect { x: number; y: number; width: number; height: number; } export interface DateTime { universalTime: number; } export interface TimeSpan { duration: number; } export interface IPropertyValue { isNumericScalar: boolean; type: Windows.Foundation.PropertyType; getUInt8(): number; getInt16(): number; getUInt16(): number; getInt32(): number; getUInt32(): number; getInt64(): number; getUInt64(): number; getSingle(): number; getDouble(): number; getChar16(): string; getBoolean(): boolean; getString(): string; getGuid(): string; getDateTime(): Date; getTimeSpan(): number; getPoint(): Windows.Foundation.Point; getSize(): Windows.Foundation.Size; getRect(): Windows.Foundation.Rect; getUInt8Array(): Uint8Array; getInt16Array(): Int16Array; getUInt16Array(): Uint16Array; getInt32Array(): Int32Array; getUInt32Array(): Uint32Array; getInt64Array(): number[]; getUInt64Array(): number[]; getSingleArray(): Float32Array; getDoubleArray(): Float64Array; getChar16Array(): string[]; getBooleanArray(): boolean[]; getStringArray(): string[]; getInspectableArray(): any[]; getGuidArray(): string[]; getDateTimeArray(): Date[]; getTimeSpanArray(): number[]; getPointArray(): Windows.Foundation.Point[]; getSizeArray(): Windows.Foundation.Size[]; getRectArray(): Windows.Foundation.Rect[]; } export interface IPropertyValueStatics { createEmpty(): any; createUInt8(value: number): any; createInt16(value: number): any; createUInt16(value: number): any; createInt32(value: number): any; createUInt32(value: number): any; createInt64(value: number): any; createUInt64(value: number): any; createSingle(value: number): any; createDouble(value: number): any; createChar16(value: string): any; createBoolean(value: boolean): any; createString(value: string): any; createInspectable(value: any): any; createGuid(value: string): any; createDateTime(value: Date): any; createTimeSpan(value: number): any; createPoint(value: Windows.Foundation.Point): any; createSize(value: Windows.Foundation.Size): any; createRect(value: Windows.Foundation.Rect): any; createUInt8Array(value: Uint8Array): any; createInt16Array(value: Int16Array): any; createUInt16Array(value: Uint16Array): any; createInt32Array(value: Int32Array): any; createUInt32Array(value: Uint32Array): any; createInt64Array(value: number[]): any; createUInt64Array(value: number[]): any; createSingleArray(value: Float32Array): any; createDoubleArray(value: Float64Array): any; createChar16Array(value: string[]): any; createBooleanArray(value: boolean[]): any; createStringArray(value: string[]): any; createInspectableArray(value: any[]): any; createGuidArray(value: string[]): any; createDateTimeArray(value: Date[]): any; createTimeSpanArray(value: number[]): any; createPointArray(value: Windows.Foundation.Point[]): any; createSizeArray(value: Windows.Foundation.Size[]): any; createRectArray(value: Windows.Foundation.Rect[]): any; } export class PropertyValue { static createEmpty(): any; static createUInt8(value: number): any; static createInt16(value: number): any; static createUInt16(value: number): any; static createInt32(value: number): any; static createUInt32(value: number): any; static createInt64(value: number): any; static createUInt64(value: number): any; static createSingle(value: number): any; static createDouble(value: number): any; static createChar16(value: string): any; static createBoolean(value: boolean): any; static createString(value: string): any; static createInspectable(value: any): any; static createGuid(value: string): any; static createDateTime(value: Date): any; static createTimeSpan(value: number): any; static createPoint(value: Windows.Foundation.Point): any; static createSize(value: Windows.Foundation.Size): any; static createRect(value: Windows.Foundation.Rect): any; static createUInt8Array(value: Uint8Array): any; static createInt16Array(value: Int16Array): any; static createUInt16Array(value: Uint16Array): any; static createInt32Array(value: Int32Array): any; static createUInt32Array(value: Uint32Array): any; static createInt64Array(value: number[]): any; static createUInt64Array(value: number[]): any; static createSingleArray(value: Float32Array): any; static createDoubleArray(value: Float64Array): any; static createChar16Array(value: string[]): any; static createBooleanArray(value: boolean[]): any; static createStringArray(value: string[]): any; static createInspectableArray(value: any[]): any; static createGuidArray(value: string[]): any; static createDateTimeArray(value: Date[]): any; static createTimeSpanArray(value: number[]): any; static createPointArray(value: Windows.Foundation.Point[]): any; static createSizeArray(value: Windows.Foundation.Size[]): any; static createRectArray(value: Windows.Foundation.Rect[]): any; } export interface AsyncActionCompletedHandler { (asyncInfo: Windows.Foundation.IAsyncAction, asyncStatus: Windows.Foundation.AsyncStatus): void; } export enum AsyncStatus { canceled, completed, error, started, } export interface EventRegistrationToken { value: number; } export interface HResult { value: number; } export interface IAsyncInfo { errorCode: number; id: number; status: Windows.Foundation.AsyncStatus; cancel(): void; close(): void; } export interface IAsyncAction extends Windows.Foundation.IAsyncInfo { completed: Windows.Foundation.AsyncActionCompletedHandler; getResults(): void; } export interface AsyncOperationWithProgressCompletedHandler<TResult, TProgress> { (asyncInfo: Windows.Foundation.IAsyncOperationWithProgress<TResult, TProgress>, asyncStatus: Windows.Foundation.AsyncStatus): void; } export interface IAsyncOperationWithProgress<TResult, TProgress> extends Windows.Foundation.IPromise<TResult> { operation: { progress: Windows.Foundation.AsyncOperationProgressHandler<TResult, TProgress>; completed: Windows.Foundation.AsyncOperationWithProgressCompletedHandler<TResult, TProgress>; getResults(): TResult; } } export interface AsyncOperationCompletedHandler<TResult> { (asyncInfo: Windows.Foundation.IAsyncOperation<TResult>, asyncStatus: Windows.Foundation.AsyncStatus): void; } export interface IAsyncOperation<TResult> extends Windows.Foundation.IPromise<TResult> { operation: { completed: Windows.Foundation.AsyncOperationCompletedHandler<TResult>; getResults(): TResult; } } export interface AsyncActionWithProgressCompletedHandler<TProgress> { (asyncInfo: Windows.Foundation.IAsyncActionWithProgress<TProgress>, asyncStatus: Windows.Foundation.AsyncStatus): void; } export interface IAsyncActionWithProgress<TProgress> extends Windows.Foundation.IAsyncInfo { progress: Windows.Foundation.AsyncActionProgressHandler<TProgress>; completed: Windows.Foundation.AsyncActionWithProgressCompletedHandler<TProgress>; getResults(): void; } export interface AsyncOperationProgressHandler<TResult, TProgress> { (asyncInfo: Windows.Foundation.IAsyncOperationWithProgress<TResult, TProgress>, progressInfo: TProgress): void; } export interface AsyncActionProgressHandler<TProgress> { (asyncInfo: Windows.Foundation.IAsyncActionWithProgress<TProgress>, progressInfo: TProgress): void; } export interface IReference<T> extends Windows.Foundation.IPropertyValue { value: T; } export interface IReferenceArray<T> extends Windows.Foundation.IPropertyValue { value: T[]; } export interface TypedEventHandler<TSender, TResult> { (sender: TSender, args: TResult): void; } export interface EventHandler<T> { (sender: any, args: T): void; } } } declare module Windows { export module Foundation { export module Metadata { export class WebHostHiddenAttribute { } export class VariantAttribute { } export class HasVariantAttribute { } export class DualApiPartitionAttribute { } export class MuseAttribute { } export enum GCPressureAmount { low, medium, high, } export class GCPressureAttribute { } export class ActivatableAttribute { constructor(version: number); constructor(type: string /* TODO: really? */, version: number); } export class VersionAttribute { constructor(version: number); } export class AllowMultipleAttribute { } export class AttributeUsageAttribute { constructor(targets: Windows.Foundation.Metadata.AttributeTargets /* TODO: Really part of WinRT? */); } export enum AttributeTargets { all, delegate, enum, event, field, interface, method, parameter, property, runtimeClass, struct, interfaceImpl, } export class DefaultOverloadAttribute { } export class DefaultAttribute { } export class GuidAttribute { constructor(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number); } export class ComposableAttribute { constructor(type: string /* TODO: really? */, compositionType: Windows.Foundation.Metadata.CompositionType, version: number); } export enum CompositionType { protected, public, } export class OverloadAttribute { constructor(method: string); } export class StaticAttribute { constructor(type: string /* TODO: really? */, version: number); } export class OverridableAttribute { } export class ProtectedAttribute { } export class ThreadingAttribute { constructor(model: Windows.Foundation.Metadata.ThreadingModel); } export enum ThreadingModel { sTA, mTA, both, invalidThreading, } export class MarshalingBehaviorAttribute { constructor(behavior: Windows.Foundation.Metadata.MarshalingType); } export enum MarshalingType { none, agile, standard, invalidMarshaling, } export class ExclusiveToAttribute { constructor(typeName: string /* TODO: really? */); } export class LengthIsAttribute { constructor(indexLengthParameter: number); } export class RangeAttribute { constructor(minValue: number, maxValue: number); } } } } declare module Windows { export module Foundation { export module Diagnostics { export enum ErrorOptions { none, suppressExceptions, forceExceptions, useSetErrorInfo, suppressSetErrorInfo, } export interface IErrorReportingSettings { setErrorOptions(value: Windows.Foundation.Diagnostics.ErrorOptions): void; getErrorOptions(): Windows.Foundation.Diagnostics.ErrorOptions; } export class RuntimeBrokerErrorSettings implements Windows.Foundation.Diagnostics.IErrorReportingSettings { setErrorOptions(value: Windows.Foundation.Diagnostics.ErrorOptions): void; getErrorOptions(): Windows.Foundation.Diagnostics.ErrorOptions; } } } } declare module Windows { export module ApplicationModel { export module Background { export enum BackgroundAccessStatus { unspecified, allowedWithAlwaysOnRealTimeConnectivity, allowedMayUseActiveRealTimeConnectivity, denied, } export interface IBackgroundExecutionManagerStatics { requestAccessAsync(): Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.Background.BackgroundAccessStatus>; requestAccessAsync(applicationId: string): Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.Background.BackgroundAccessStatus>; removeAccess(): void; removeAccess(applicationId: string): void; getAccessStatus(): Windows.ApplicationModel.Background.BackgroundAccessStatus; getAccessStatus(applicationId: string): Windows.ApplicationModel.Background.BackgroundAccessStatus; } export class BackgroundExecutionManager { static requestAccessAsync(): Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.Background.BackgroundAccessStatus>; static requestAccessAsync(applicationId: string): Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.Background.BackgroundAccessStatus>; static removeAccess(): void; static removeAccess(applicationId: string): void; static getAccessStatus(): Windows.ApplicationModel.Background.BackgroundAccessStatus; static getAccessStatus(applicationId: string): Windows.ApplicationModel.Background.BackgroundAccessStatus; } export enum BackgroundTaskCancellationReason { abort, terminating, loggingOff, servicingUpdate, } export interface BackgroundTaskCanceledEventHandler { (sender: Windows.ApplicationModel.Background.IBackgroundTaskInstance, reason: Windows.ApplicationModel.Background.BackgroundTaskCancellationReason): void; } export interface IBackgroundTaskInstance { instanceId: string; progress: number; suspendedCount: number; task: Windows.ApplicationModel.Background.BackgroundTaskRegistration; triggerDetails: any; oncanceled: any/* TODO */; getDeferral(): Windows.ApplicationModel.Background.BackgroundTaskDeferral; } export class BackgroundTaskRegistration implements Windows.ApplicationModel.Background.IBackgroundTaskRegistration { name: string; taskId: string; onprogress: any/* TODO */; oncompleted: any/* TODO */; unregister(cancelTask: boolean): void; static allTasks: Windows.Foundation.Collections.IMapView<string, Windows.ApplicationModel.Background.IBackgroundTaskRegistration>; } export class BackgroundTaskDeferral implements Windows.ApplicationModel.Background.IBackgroundTaskDeferral { complete(): void; } export interface BackgroundTaskProgressEventHandler { (sender: Windows.ApplicationModel.Background.BackgroundTaskRegistration, args: Windows.ApplicationModel.Background.BackgroundTaskProgressEventArgs): void; } export class BackgroundTaskProgressEventArgs implements Windows.ApplicationModel.Background.IBackgroundTaskProgressEventArgs { instanceId: string; progress: number; } export interface BackgroundTaskCompletedEventHandler { (sender: Windows.ApplicationModel.Background.BackgroundTaskRegistration, args: Windows.ApplicationModel.Background.BackgroundTaskCompletedEventArgs): void; } export class BackgroundTaskCompletedEventArgs implements Windows.ApplicationModel.Background.IBackgroundTaskCompletedEventArgs { instanceId: string; checkResult(): void; } export interface IBackgroundTaskDeferral { complete(): void; } export interface IBackgroundTask { run(taskInstance: Windows.ApplicationModel.Background.IBackgroundTaskInstance): void; } export interface IBackgroundTaskRegistration { name: string; taskId: string; onprogress: any/* TODO */; oncompleted: any/* TODO */; unregister(cancelTask: boolean): void; } export interface IBackgroundTaskRegistrationStatics { allTasks: Windows.Foundation.Collections.IMapView<string, Windows.ApplicationModel.Background.IBackgroundTaskRegistration>; } export interface IBackgroundTaskBuilder { name: string; taskEntryPoint: string; setTrigger(trigger: Windows.ApplicationModel.Background.IBackgroundTrigger): void; addCondition(condition: Windows.ApplicationModel.Background.IBackgroundCondition): void; register(): Windows.ApplicationModel.Background.BackgroundTaskRegistration; } export interface IBackgroundTrigger { } export interface IBackgroundCondition { } export interface IBackgroundTaskCompletedEventArgs { instanceId: string; checkResult(): void; } export interface IBackgroundTaskProgressEventArgs { instanceId: string; progress: number; } export class BackgroundTaskBuilder implements Windows.ApplicationModel.Background.IBackgroundTaskBuilder { name: string; taskEntryPoint: string; setTrigger(trigger: Windows.ApplicationModel.Background.IBackgroundTrigger): void; addCondition(condition: Windows.ApplicationModel.Background.IBackgroundCondition): void; register(): Windows.ApplicationModel.Background.BackgroundTaskRegistration; } export enum SystemTriggerType { invalid, smsReceived, userPresent, userAway, networkStateChange, controlChannelReset, internetAvailable, sessionConnected, servicingComplete, lockScreenApplicationAdded, lockScreenApplicationRemoved, timeZoneChange, onlineIdConnectedStateChange, } export enum SystemConditionType { invalid, userPresent, userNotPresent, internetAvailable, internetNotAvailable, sessionConnected, sessionDisconnected, } export interface ISystemTrigger extends Windows.ApplicationModel.Background.IBackgroundTrigger { oneShot: boolean; triggerType: Windows.ApplicationModel.Background.SystemTriggerType; } export interface ISystemTriggerFactory { create(triggerType: Windows.ApplicationModel.Background.SystemTriggerType, oneShot: boolean): Windows.ApplicationModel.Background.SystemTrigger; } export class SystemTrigger implements Windows.ApplicationModel.Background.ISystemTrigger, Windows.ApplicationModel.Background.IBackgroundTrigger { constructor(triggerType: Windows.ApplicationModel.Background.SystemTriggerType, oneShot: boolean); oneShot: boolean; triggerType: Windows.ApplicationModel.Background.SystemTriggerType; } export interface ISystemCondition extends Windows.ApplicationModel.Background.IBackgroundCondition { conditionType: Windows.ApplicationModel.Background.SystemConditionType; } export interface ISystemConditionFactory { create(conditionType: Windows.ApplicationModel.Background.SystemConditionType): Windows.ApplicationModel.Background.SystemCondition; } export class SystemCondition implements Windows.ApplicationModel.Background.ISystemCondition, Windows.ApplicationModel.Background.IBackgroundCondition { constructor(conditionType: Windows.ApplicationModel.Background.SystemConditionType); conditionType: Windows.ApplicationModel.Background.SystemConditionType; } export interface INetworkOperatorNotificationTrigger extends Windows.ApplicationModel.Background.IBackgroundTrigger { networkAccountId: string; } export interface INetworkOperatorNotificationTriggerFactory { create(networkAccountId: string): Windows.ApplicationModel.Background.NetworkOperatorNotificationTrigger; } export class NetworkOperatorNotificationTrigger implements Windows.ApplicationModel.Background.INetworkOperatorNotificationTrigger, Windows.ApplicationModel.Background.IBackgroundTrigger { constructor(networkAccountId: string); networkAccountId: string; } export interface ITimeTrigger extends Windows.ApplicationModel.Background.IBackgroundTrigger { freshnessTime: number; oneShot: boolean; } export interface ITimeTriggerFactory { create(freshnessTime: number, oneShot: boolean): Windows.ApplicationModel.Background.TimeTrigger; } export class TimeTrigger implements Windows.ApplicationModel.Background.ITimeTrigger, Windows.ApplicationModel.Background.IBackgroundTrigger { constructor(freshnessTime: number, oneShot: boolean); freshnessTime: number; oneShot: boolean; } export interface IMaintenanceTrigger extends Windows.ApplicationModel.Background.IBackgroundTrigger { freshnessTime: number; oneShot: boolean; } export interface IMaintenanceTriggerFactory { create(freshnessTime: number, oneShot: boolean): Windows.ApplicationModel.Background.MaintenanceTrigger; } export class MaintenanceTrigger implements Windows.ApplicationModel.Background.IMaintenanceTrigger, Windows.ApplicationModel.Background.IBackgroundTrigger { constructor(freshnessTime: number, oneShot: boolean); freshnessTime: number; oneShot: boolean; } export interface INetworkOperatorHotspotAuthenticationTrigger extends Windows.ApplicationModel.Background.IBackgroundTrigger { } export class NetworkOperatorHotspotAuthenticationTrigger implements Windows.ApplicationModel.Background.INetworkOperatorHotspotAuthenticationTrigger, Windows.ApplicationModel.Background.IBackgroundTrigger { } export interface IPushNotificationTriggerFactory { create(applicationId: string): Windows.ApplicationModel.Background.PushNotificationTrigger; } export class PushNotificationTrigger implements Windows.ApplicationModel.Background.IBackgroundTrigger { constructor(applicationId: string); constructor(); } } } } declare module Windows { export module ApplicationModel { export module Contacts { export enum ContactFieldType { email, phoneNumber, location, instantMessage, custom, } export enum ContactFieldCategory { none, home, work, mobile, other, } export enum ContactSelectionMode { contacts, fields, } export interface IContactField { category: Windows.ApplicationModel.Contacts.ContactFieldCategory; name: string; type: Windows.ApplicationModel.Contacts.ContactFieldType; value: string; } export class ContactField implements Windows.ApplicationModel.Contacts.IContactField { constructor(value: string, type: Windows.ApplicationModel.Contacts.ContactFieldType); constructor(value: string, type: Windows.ApplicationModel.Contacts.ContactFieldType, category: Windows.ApplicationModel.Contacts.ContactFieldCategory); constructor(name: string, value: string, type: Windows.ApplicationModel.Contacts.ContactFieldType, category: Windows.ApplicationModel.Contacts.ContactFieldCategory); category: Windows.ApplicationModel.Contacts.ContactFieldCategory; name: string; type: Windows.ApplicationModel.Contacts.ContactFieldType; value: string; } export interface IContactLocationField extends Windows.ApplicationModel.Contacts.IContactField { city: string; country: string; postalCode: string; region: string; street: string; unstructuredAddress: string; } export class ContactLocationField implements Windows.ApplicationModel.Contacts.IContactLocationField, Windows.ApplicationModel.Contacts.IContactField { constructor(unstructuredAddress: string); constructor(unstructuredAddress: string, category: Windows.ApplicationModel.Contacts.ContactFieldCategory); constructor(unstructuredAddress: string, category: Windows.ApplicationModel.Contacts.ContactFieldCategory, street: string, city: string, region: string, country: string, postalCode: string); city: string; country: string; postalCode: string; region: string; street: string; unstructuredAddress: string; category: Windows.ApplicationModel.Contacts.ContactFieldCategory; name: string; type: Windows.ApplicationModel.Contacts.ContactFieldType; value: string; } export interface IContactInstantMessageField extends Windows.ApplicationModel.Contacts.IContactField { displayText: string; launchUri: Windows.Foundation.Uri; service: string; userName: string; } export class ContactInstantMessageField implements Windows.ApplicationModel.Contacts.IContactInstantMessageField, Windows.ApplicationModel.Contacts.IContactField { constructor(userName: string); constructor(userName: string, category: Windows.ApplicationModel.Contacts.ContactFieldCategory); constructor(userName: string, category: Windows.A