TypeScript definitions updated

This commit is contained in:
Vladimir Enchev
2015-07-10 14:44:19 +03:00
parent aac3d61e9d
commit 42946cead5
6 changed files with 16809 additions and 1851 deletions

View File

@@ -634,9 +634,6 @@
<TypeScriptCompile Include="application-settings\application-settings-common.ts" /> <TypeScriptCompile Include="application-settings\application-settings-common.ts" />
<TypeScriptCompile Include="apps\tests\timer-tests.ts" /> <TypeScriptCompile Include="apps\tests\timer-tests.ts" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<TypeScriptCompile Include="libjs.d.ts" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="apps\cuteness.unoptimized\details-page.css"> <Content Include="apps\cuteness.unoptimized\details-page.css">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>

View File

@@ -1,3 +1,3 @@
///<reference no-default-lib="true"/> ///<reference no-default-lib="true"/>
///<reference path='libjs.d.ts' /> ///<reference path='lib.d.ts' />
///<reference path='declarations.d.ts' /> ///<reference path='declarations.d.ts' />

45
declarations.d.ts vendored
View File

@@ -12,24 +12,22 @@ interface Console {
dir(obj: any): void; dir(obj: any): void;
} }
interface WeakMap<K, V> {
clear(): void;
delete(key: K): boolean;
get(key: K): V;
has(key: K): boolean;
set(key: K, value: V): WeakMap<K, V>;
}
declare var WeakMap: {
new <K, V>(): WeakMap<K, V>;
}
declare var console: Console; declare var console: Console;
declare var global; declare var global;
declare var require; declare var require;
interface TypedPropertyDescriptor<T> {
enumerable?: boolean;
configurable?: boolean;
writable?: boolean;
value?: T;
get?: () => T;
set?: (value: T) => void;
}
declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
// Global functions // Global functions
declare function Deprecated(target: Object, key?: string | symbol, value?: any): void; declare function Deprecated(target: Object, key?: string | symbol, value?: any): void;
@@ -42,25 +40,6 @@ declare function fail(data: any): void;
declare var __dirname: string; declare var __dirname: string;
declare var __filename: string; declare var __filename: string;
declare class XMLHttpRequest {
onreadystatechange: Function;
open(method: string, url: string, async?: boolean, user?: string, password?: string): void;
abort(): void;
send(data?: string): void;
setRequestHeader(header: string, value: string): void;
getAllResponseHeaders(): string;
getResponseHeader(header: string): string;
overrideMimeType(mime: string): void;
readyState: number;
response: any;
responseText: string;
responseType: string;
status: number;
onload: () => void;
onerror: () => void;
}
/** /**
* Calls a function after a specified delay. * Calls a function after a specified delay.
* @param callback The function to be called. * @param callback The function to be called.

63
ios.d.ts vendored
View File

@@ -4731,21 +4731,6 @@ declare class ACAccountStore extends NSObject {
static alloc(): ACAccountStore; static alloc(): ACAccountStore;
static extend(methods: any, exposedMethods?: {name?: string; protocols?: any[]; exposedMethods?: {[name: string]: string}}): any; static extend(methods: any, exposedMethods?: {name?: string; protocols?: any[]; exposedMethods?: {[name: string]: string}}): any;
} }
declare class UIEvent extends NSObject {
type: number;
subtype: number;
timestamp: number;
constructor();
allTouches(): NSSet;
touchesForWindow(window: UIWindow): NSSet;
touchesForView(view: UIView): NSSet;
touchesForGestureRecognizer(gesture: UIGestureRecognizer): NSSet;
init(): UIEvent;
static new(): UIEvent;
static allocWithZone(zone: any): UIEvent;
static alloc(): UIEvent;
static extend(methods: any, exposedMethods?: {name?: string; protocols?: any[]; exposedMethods?: {[name: string]: string}}): any;
}
declare class UIResponder extends NSObject { declare class UIResponder extends NSObject {
undoManager: NSUndoManager; undoManager: NSUndoManager;
keyCommands: NSArray; keyCommands: NSArray;
@@ -4763,14 +4748,14 @@ declare class UIResponder extends NSObject {
canResignFirstResponder(): boolean; canResignFirstResponder(): boolean;
resignFirstResponder(): boolean; resignFirstResponder(): boolean;
isFirstResponder(): boolean; isFirstResponder(): boolean;
touchesBeganWithEvent(touches: NSSet, event: UIEvent): void; touchesBeganWithEvent(touches: NSSet, event: any): void;
touchesMovedWithEvent(touches: NSSet, event: UIEvent): void; touchesMovedWithEvent(touches: NSSet, event: any): void;
touchesEndedWithEvent(touches: NSSet, event: UIEvent): void; touchesEndedWithEvent(touches: NSSet, event: any): void;
touchesCancelledWithEvent(touches: NSSet, event: UIEvent): void; touchesCancelledWithEvent(touches: NSSet, event: any): void;
motionBeganWithEvent(motion: number, event: UIEvent): void; motionBeganWithEvent(motion: number, event: any): void;
motionEndedWithEvent(motion: number, event: UIEvent): void; motionEndedWithEvent(motion: number, event: any): void;
motionCancelledWithEvent(motion: number, event: UIEvent): void; motionCancelledWithEvent(motion: number, event: any): void;
remoteControlReceivedWithEvent(event: UIEvent): void; remoteControlReceivedWithEvent(event: any): void;
canPerformActionWithSender(action: any, sender: any): boolean; canPerformActionWithSender(action: any, sender: any): boolean;
targetForActionWithSender(action: any, sender: any): any; targetForActionWithSender(action: any, sender: any): any;
static clearTextInputContextIdentifier(identifier: string): void; static clearTextInputContextIdentifier(identifier: string): void;
@@ -5046,8 +5031,8 @@ declare class UIView extends UIResponder implements NSCoding, UIAppearance, UIAp
constructor(); constructor();
static layerClass(): any; static layerClass(): any;
initWithFrame(frame: CGRect): UIView; initWithFrame(frame: CGRect): UIView;
hitTestWithEvent(point: CGPoint, event: UIEvent): UIView; hitTestWithEvent(point: CGPoint, event: any): UIView;
pointInsideWithEvent(point: CGPoint, event: UIEvent): boolean; pointInsideWithEvent(point: CGPoint, event: any): boolean;
convertPointToView(point: CGPoint, view: UIView): CGPoint; convertPointToView(point: CGPoint, view: UIView): CGPoint;
convertPointFromView(point: CGPoint, view: UIView): CGPoint; convertPointFromView(point: CGPoint, view: UIView): CGPoint;
convertRectToView(rect: CGRect, view: UIView): CGRect; convertRectToView(rect: CGRect, view: UIView): CGRect;
@@ -5187,16 +5172,16 @@ declare class UIControl extends UIView {
touchInside: boolean; touchInside: boolean;
constructor(frame: CGRect); constructor(frame: CGRect);
constructor(); constructor();
beginTrackingWithTouchWithEvent(touch: UITouch, event: UIEvent): boolean; beginTrackingWithTouchWithEvent(touch: UITouch, event: any): boolean;
continueTrackingWithTouchWithEvent(touch: UITouch, event: UIEvent): boolean; continueTrackingWithTouchWithEvent(touch: UITouch, event: any): boolean;
endTrackingWithTouchWithEvent(touch: UITouch, event: UIEvent): void; endTrackingWithTouchWithEvent(touch: UITouch, event: any): void;
cancelTrackingWithEvent(event: UIEvent): void; cancelTrackingWithEvent(event: any): void;
addTargetActionForControlEvents(target: any, action: any, controlEvents: number): void; addTargetActionForControlEvents(target: any, action: any, controlEvents: number): void;
removeTargetActionForControlEvents(target: any, action: any, controlEvents: number): void; removeTargetActionForControlEvents(target: any, action: any, controlEvents: number): void;
allTargets(): NSSet; allTargets(): NSSet;
allControlEvents(): number; allControlEvents(): number;
actionsForTargetForControlEvent(target: any, controlEvent: number): NSArray; actionsForTargetForControlEvent(target: any, controlEvent: number): NSArray;
sendActionToForEvent(action: any, target: any, event: UIEvent): void; sendActionToForEvent(action: any, target: any, event: any): void;
sendActionsForControlEvents(controlEvents: number): void; sendActionsForControlEvents(controlEvents: number): void;
initWithFrame(frame: CGRect): UIControl; initWithFrame(frame: CGRect): UIControl;
init(): UIControl; init(): UIControl;
@@ -5555,8 +5540,8 @@ declare class UIApplication extends UIResponder implements UIActionSheetDelegate
isIgnoringInteractionEvents(): boolean; isIgnoringInteractionEvents(): boolean;
openURL(url: NSURL): boolean; openURL(url: NSURL): boolean;
canOpenURL(url: NSURL): boolean; canOpenURL(url: NSURL): boolean;
sendEvent(event: UIEvent): void; sendEvent(event: any): void;
sendActionToFromForEvent(action: any, target: any, sender: any, event: UIEvent): boolean; sendActionToFromForEvent(action: any, target: any, sender: any, event: any): boolean;
setStatusBarStyleAnimated(statusBarStyle: number, animated: boolean): void; setStatusBarStyleAnimated(statusBarStyle: number, animated: boolean): void;
setStatusBarHiddenWithAnimation(hidden: boolean, animation: number): void; setStatusBarHiddenWithAnimation(hidden: boolean, animation: number): void;
setStatusBarOrientationAnimated(interfaceOrientation: number, animated: boolean): void; setStatusBarOrientationAnimated(interfaceOrientation: number, animated: boolean): void;
@@ -5788,16 +5773,16 @@ declare class UIGestureRecognizer extends NSObject {
locationInView(view: UIView): CGPoint; locationInView(view: UIView): CGPoint;
numberOfTouches(): number; numberOfTouches(): number;
locationOfTouchInView(touchIndex: number, view: UIView): CGPoint; locationOfTouchInView(touchIndex: number, view: UIView): CGPoint;
ignoreTouchForEvent(touch: UITouch, event: UIEvent): void; ignoreTouchForEvent(touch: UITouch, event: any): void;
reset(): void; reset(): void;
canPreventGestureRecognizer(preventedGestureRecognizer: UIGestureRecognizer): boolean; canPreventGestureRecognizer(preventedGestureRecognizer: UIGestureRecognizer): boolean;
canBePreventedByGestureRecognizer(preventingGestureRecognizer: UIGestureRecognizer): boolean; canBePreventedByGestureRecognizer(preventingGestureRecognizer: UIGestureRecognizer): boolean;
shouldRequireFailureOfGestureRecognizer(otherGestureRecognizer: UIGestureRecognizer): boolean; shouldRequireFailureOfGestureRecognizer(otherGestureRecognizer: UIGestureRecognizer): boolean;
shouldBeRequiredToFailByGestureRecognizer(otherGestureRecognizer: UIGestureRecognizer): boolean; shouldBeRequiredToFailByGestureRecognizer(otherGestureRecognizer: UIGestureRecognizer): boolean;
touchesBeganWithEvent(touches: NSSet, event: UIEvent): void; touchesBeganWithEvent(touches: NSSet, event: any): void;
touchesMovedWithEvent(touches: NSSet, event: UIEvent): void; touchesMovedWithEvent(touches: NSSet, event: any): void;
touchesEndedWithEvent(touches: NSSet, event: UIEvent): void; touchesEndedWithEvent(touches: NSSet, event: any): void;
touchesCancelledWithEvent(touches: NSSet, event: UIEvent): void; touchesCancelledWithEvent(touches: NSSet, event: any): void;
init(): UIGestureRecognizer; init(): UIGestureRecognizer;
static new(): UIGestureRecognizer; static new(): UIGestureRecognizer;
static allocWithZone(zone: any): UIGestureRecognizer; static allocWithZone(zone: any): UIGestureRecognizer;
@@ -5972,7 +5957,7 @@ declare class UIScrollView extends UIView implements NSCoding {
setContentOffsetAnimated(contentOffset: CGPoint, animated: boolean): void; setContentOffsetAnimated(contentOffset: CGPoint, animated: boolean): void;
scrollRectToVisibleAnimated(rect: CGRect, animated: boolean): void; scrollRectToVisibleAnimated(rect: CGRect, animated: boolean): void;
flashScrollIndicators(): void; flashScrollIndicators(): void;
touchesShouldBeginWithEventInContentView(touches: NSSet, event: UIEvent, view: UIView): boolean; touchesShouldBeginWithEventInContentView(touches: NSSet, event: any, view: UIView): boolean;
touchesShouldCancelInContentView(view: UIView): boolean; touchesShouldCancelInContentView(view: UIView): boolean;
setZoomScaleAnimated(scale: number, animated: boolean): void; setZoomScaleAnimated(scale: number, animated: boolean): void;
zoomToRectAnimated(rect: CGRect, animated: boolean): void; zoomToRectAnimated(rect: CGRect, animated: boolean): void;
@@ -8838,7 +8823,7 @@ declare class UIWindow extends UIView {
resignKeyWindow(): void; resignKeyWindow(): void;
makeKeyWindow(): void; makeKeyWindow(): void;
makeKeyAndVisible(): void; makeKeyAndVisible(): void;
sendEvent(event: UIEvent): void; sendEvent(event: any): void;
convertPointToWindow(point: CGPoint, window: UIWindow): CGPoint; convertPointToWindow(point: CGPoint, window: UIWindow): CGPoint;
convertPointFromWindow(point: CGPoint, window: UIWindow): CGPoint; convertPointFromWindow(point: CGPoint, window: UIWindow): CGPoint;
convertRectToWindow(rect: CGRect, window: UIWindow): CGRect; convertRectToWindow(rect: CGRect, window: UIWindow): CGRect;

16772
lib.d.ts vendored Normal file
View File

File diff suppressed because it is too large Load Diff

1775
libjs.d.ts vendored
View File

File diff suppressed because it is too large Load Diff