From 5bb489074d5049b0e9c2259a1ad8147239f6de3a Mon Sep 17 00:00:00 2001 From: Stephan Date: Thu, 13 Jul 2017 01:02:42 +0200 Subject: [PATCH 1/2] Knockout update KnockoutComponentTypes.Loader callbacks According to http://knockoutjs.com/documentation/component-loaders.html#loadcomponentname-componentconfig-callback ```result``` can be null --- types/knockout/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/knockout/index.d.ts b/types/knockout/index.d.ts index 40464a3bd8..5dc420ff5b 100644 --- a/types/knockout/index.d.ts +++ b/types/knockout/index.d.ts @@ -660,9 +660,9 @@ declare namespace KnockoutComponentTypes { interface Loader { getConfig? (componentName: string, callback: (result: ComponentConfig | null) => void): void; - loadComponent? (componentName: string, config: ComponentConfig, callback: (result: Definition) => void): void; - loadTemplate? (componentName: string, templateConfig: any, callback: (result: Node[]) => void): void; - loadViewModel? (componentName: string, viewModelConfig: any, callback: (result: any) => void): void; + loadComponent? (componentName: string, config: ComponentConfig, callback: (result: Definition | null) => void): void; + loadTemplate? (componentName: string, templateConfig: any, callback: (result: Node[] | null) => void): void; + loadViewModel? (componentName: string, viewModelConfig: any, callback: (result: any | null) => void): void; suppressLoaderExceptions?: boolean; } From 7a119a9bef15ec7e384b60bb515a97386c1e505c Mon Sep 17 00:00:00 2001 From: Stephan Date: Thu, 13 Jul 2017 01:29:07 +0200 Subject: [PATCH 2/2] merged any | null to any --- types/knockout/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/knockout/index.d.ts b/types/knockout/index.d.ts index 5dc420ff5b..18918b3012 100644 --- a/types/knockout/index.d.ts +++ b/types/knockout/index.d.ts @@ -662,7 +662,7 @@ declare namespace KnockoutComponentTypes { getConfig? (componentName: string, callback: (result: ComponentConfig | null) => void): void; loadComponent? (componentName: string, config: ComponentConfig, callback: (result: Definition | null) => void): void; loadTemplate? (componentName: string, templateConfig: any, callback: (result: Node[] | null) => void): void; - loadViewModel? (componentName: string, viewModelConfig: any, callback: (result: any | null) => void): void; + loadViewModel? (componentName: string, viewModelConfig: any, callback: (result: any) => void): void; suppressLoaderExceptions?: boolean; }