mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 23:37:04 +00:00
[knockout] Update KnockoutComponentTypes.Loader.getConfig signature (#15065)
* [knockout] Update KnockoutComponentTypes.Loader.getConfig signature Callback in method signature is missing a null type, so when trying to call the callback with null (which is a valid scenario), strict null check fails. * [knockout] Fix failing build of tests with TypeScript 2.0 * [knockout] Fix failing build of tests with TypeScript 2.0 * [knockout] Fix failing build of tests with TypeScript 2.0 * [knockout] Fix failing build of tests with TypeScript 2.0
This commit is contained in:
committed by
Mohamed Hegazy
parent
b6c328979c
commit
4aae472c0f
Vendored
+1
-1
@@ -658,7 +658,7 @@ declare namespace KnockoutComponentTypes {
|
||||
}
|
||||
|
||||
interface Loader {
|
||||
getConfig? (componentName: string, callback: (result: ComponentConfig) => void): void;
|
||||
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;
|
||||
|
||||
@@ -1,12 +1,31 @@
|
||||
/// <reference types="jasmine" />
|
||||
/// <reference types="knockout.mapping" />
|
||||
|
||||
// Jasmine definitions
|
||||
declare function describe(desc: string, f: () => void): void;
|
||||
declare function it(desc: string, f: () => void): void;
|
||||
declare function beforeEach(action: (done: DoneFn) => void, timeout?: number): void;
|
||||
declare function expect(spy: Function): jasmine.Matchers;
|
||||
declare function expect(actual: any): jasmine.Matchers;
|
||||
|
||||
interface DoneFn extends Function {
|
||||
(): void;
|
||||
|
||||
/** fails the spec and indicates that it has completed. If the message is an Error, Error.message is used */
|
||||
fail: (message?: Error|string) => void;
|
||||
}
|
||||
|
||||
declare namespace jasmine {
|
||||
interface Matchers {
|
||||
toEqual(expected: any, expectationFailOutput?: any): boolean;
|
||||
toBeDefined(expectationFailOutput?: any): boolean;
|
||||
toBeNull(expectationFailOutput?: any): boolean;
|
||||
toContainHtml(expected: string): boolean;
|
||||
toContainText(expected: string): boolean;
|
||||
not: Matchers;
|
||||
}
|
||||
}
|
||||
//End Jasmine definitions
|
||||
|
||||
|
||||
var dummyTemplateEngine = function (templates?) {
|
||||
var inMemoryTemplates = templates || {};
|
||||
|
||||
Reference in New Issue
Block a user