From f2623b8f6c8f4741ea55252992567e2445dd15dd Mon Sep 17 00:00:00 2001 From: Nicolas Mehlei Date: Fri, 14 Nov 2014 18:12:58 +0100 Subject: [PATCH 1/3] fixed two incorrect parameter names for ko.applyBindings and ko.applyBindingsToDescendants --- knockout/knockout.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/knockout/knockout.d.ts b/knockout/knockout.d.ts index 5c9ab58f3..3c2eaaca0 100644 --- a/knockout/knockout.d.ts +++ b/knockout/knockout.d.ts @@ -413,8 +413,8 @@ interface KnockoutStatic { virtualElements: KnockoutVirtualElements; extenders: KnockoutExtenders; - applyBindings(viewModel?: any, rootNode?: any): void; - applyBindingsToDescendants(viewModel: any, rootNode: any): void; + applyBindings(viewModelOrBindingContext?: any, rootNode?: any): void; + applyBindingsToDescendants(viewModelOrBindingContext: any, rootNode: any): void; applyBindingAccessorsToNode(node: Node, bindings: (bindingContext: KnockoutBindingContext, node: Node) => {}, bindingContext: KnockoutBindingContext): void; applyBindingAccessorsToNode(node: Node, bindings: {}, bindingContext: KnockoutBindingContext): void; applyBindingAccessorsToNode(node: Node, bindings: (bindingContext: KnockoutBindingContext, node: Node) => {}, viewModel: any): void; From 07933d7f8bccc49a24b6d63be55ee44818bc2b97 Mon Sep 17 00:00:00 2001 From: Nicolas Mehlei Date: Fri, 14 Nov 2014 18:22:12 +0100 Subject: [PATCH 2/3] added missing Duration methods --- moment/moment.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/moment/moment.d.ts b/moment/moment.d.ts index d4abff0df..b9068f6dc 100644 --- a/moment/moment.d.ts +++ b/moment/moment.d.ts @@ -35,6 +35,8 @@ interface Duration { humanize(withSuffix?: boolean): string; + as(units: string): number; + milliseconds(): number; asMilliseconds(): number; @@ -56,6 +58,10 @@ interface Duration { years(): number; asYears(): number; + add(n: number, p: string): Duration; + add(n: number): Duration; + add(d: Duration): Duration; + subtract(n: number, p: string): Duration; subtract(n: number): Duration; subtract(d: Duration): Duration; From f171dd3fcdf049755b7ce9fdb54bf43c15985f9e Mon Sep 17 00:00:00 2001 From: Nicolas Mehlei Date: Fri, 14 Nov 2014 18:28:52 +0100 Subject: [PATCH 3/3] added singular methods for Moment methods: hour, minute, second and millisecond --- moment/moment.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/moment/moment.d.ts b/moment/moment.d.ts index b9068f6dc..b6ac9a79e 100644 --- a/moment/moment.d.ts +++ b/moment/moment.d.ts @@ -176,12 +176,20 @@ interface Moment { day(): number; date(d: number): Moment; date(): number; + hour(h: number): Moment; + hour(): number; hours(h: number): Moment; hours(): number; + minute(m: number): Moment; + minute(): number; minutes(m: number): Moment; minutes(): number; + second(s: number): Moment; + second(): number; seconds(s: number): Moment; seconds(): number; + millisecond(ms: number): Moment; + millisecond(): number; milliseconds(ms: number): Moment; milliseconds(): number; weekday(): number;