mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-20 12:00:53 +08:00
Added case for registering a custom component with an empty config for custom elements, where loading is handled by name convention
This commit is contained in:
Vendored
+1
@@ -564,6 +564,7 @@ interface KnockoutComponents {
|
||||
register(componentName: string, config: KnockoutComponentRegisterFnViewModel): void;
|
||||
register(componentName: string, config: KnockoutComponentRegisterStringTemplateFnViewModel): void;
|
||||
register(componentName: string, config: KnockoutComponentRegisterAMD): void;
|
||||
register(componentName: string, config: {}): void;
|
||||
|
||||
isRegistered(componentName: string): boolean;
|
||||
unregister(componentName: string): void;
|
||||
|
||||
@@ -645,6 +645,7 @@ function test_Components() {
|
||||
// object template for element and inline function (commonly used in examples)
|
||||
ko.components.register("name", { template: { require: "module" }, viewModel: { instance: null } });
|
||||
|
||||
//
|
||||
// Empty config for registering custom elements that are handled by name convention
|
||||
ko.components.register('name', { /* No config needed */ });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user