From b282b5a78abc998eefd56024f8f3d2cd973cadef Mon Sep 17 00:00:00 2001 From: mihailik Date: Sat, 16 Nov 2013 11:11:55 +0000 Subject: [PATCH] Fix when compiling with the latest TypeScript (develop branch) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Latest TypeScript complains about Array type used without a generic parameter. I suggest replacing Array with any[], which works for both old and new TypeScript versions. knockout.d.ts(171,47): ↵ error TS2173: Generic type references must include all type arguments. ↵ knockout.d.ts(172,76): error TS2173: Generic type references must include all type arguments. ↵ knockout.d.ts(200,36): error TS2173: Generic type references must include all type arguments. ↵ knockout.d.ts(202,36): error TS2173: Generic type references must include all type arguments. ↵ knockout.d.ts(204,38): error TS2173: Generic type references must include all type arguments. ↵ knockout.d.ts(363,110): error TS2173: Generic type references must include all type arguments. ↵ knockout.d.ts(489,71): error TS2173: Generic type references must include all type arguments. ↵ knockout.d.ts(490,66): error TS2173: Generic type references must include all type arguments. ↵ knockout.d.ts(491,90): error TS2173: Generic type references must include all type arguments. ↵ knockout.d.ts(492,85): error TS2173: Generic type references must include all type arguments. ↵ --- knockout/knockout.d.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/knockout/knockout.d.ts b/knockout/knockout.d.ts index d5f3bda365..b43997df3f 100644 --- a/knockout/knockout.d.ts +++ b/knockout/knockout.d.ts @@ -168,8 +168,8 @@ interface KnockoutBindingHandlers { interface KnockoutMemoization { memoize(callback: () => string): string; - unmemoize(memoId: string, callbackParams: Array): boolean; - unmemoizeDomNodeAndDescendants(domNode: any, extraCallbackParamsArray: Array): boolean; + unmemoize(memoId: string, callbackParams: any[]): boolean; + unmemoizeDomNodeAndDescendants(domNode: any, extraCallbackParamsArray: any[]): boolean; parseMemoText(memoText: string): string; } @@ -197,11 +197,11 @@ interface KnockoutUtils { // utils.domManipulation.js ////////////////////////////////// - simpleHtmlParse(html: string): Array; + simpleHtmlParse(html: string): any[]; - jQueryHtmlParse(html: string): Array; + jQueryHtmlParse(html: string): any[]; - parseHtmlFragment(html: string): Array; + parseHtmlFragment(html: string): any[]; setHtml(node: Element, html: string): void; @@ -360,7 +360,7 @@ interface KnockoutTemplateSources { interface KnockoutNativeTemplateEngine { - renderTemplateSource(templateSource: Object, bindingContext?: KnockoutBindingContext, options?: Object): Array; + renderTemplateSource(templateSource: Object, bindingContext?: KnockoutBindingContext, options?: Object): any[]; } ////////////////////////////////// @@ -486,10 +486,10 @@ interface KnockoutStatic { renderTemplate(template: Function, dataOrBindingContext: any, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any; renderTemplate(template: any, dataOrBindingContext: any, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any; - renderTemplateForEach(template: Function, arrayOrObservableArray: Array, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any; - renderTemplateForEach(template: any, arrayOrObservableArray: Array, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any; - renderTemplateForEach(template: Function, arrayOrObservableArray: KnockoutObservable, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any; - renderTemplateForEach(template: any, arrayOrObservableArray: KnockoutObservable, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any; + renderTemplateForEach(template: Function, arrayOrObservableArray: any[], options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any; + renderTemplateForEach(template: any, arrayOrObservableArray: any[], options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any; + renderTemplateForEach(template: Function, arrayOrObservableArray: KnockoutObservable, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any; + renderTemplateForEach(template: any, arrayOrObservableArray: KnockoutObservable, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any; expressionRewriting: { bindingRewriteValidators: any;