@types/knockout
- Version 3.4.73
- Published
- 49.2 kB
- No dependencies
- MIT license
Install
npm i @types/knockout
yarn add @types/knockout
pnpm add @types/knockout
Overview
TypeScript definitions for Knockout
Index
Variables
variable ko
var ko: KnockoutStatic;
Namespaces
namespace KnockoutComponentTypes
namespace KnockoutComponentTypes {}
interface ComponentConfig
interface ComponentConfig<T = ViewModel> {}
property createViewModel
createViewModel?: any;
property template
template: any;
property viewModel
viewModel?: T | undefined;
interface ComponentInfo
interface ComponentInfo {}
property element
element: Node;
property templateNodes
templateNodes: Node[];
interface Config
interface Config<T> {}
property synchronous
synchronous?: boolean | undefined;
property template
template: string | Node[] | DocumentFragment | TemplateElement | AMDModule;
property viewModel
viewModel?: T | undefined;
interface Definition
interface Definition {}
property template
template: Node[];
method createViewModel
createViewModel: (params: any, options: { element: Node }) => any;
interface EmptyConfig
interface EmptyConfig {}
interface Loader
interface Loader {}
property suppressLoaderExceptions
suppressLoaderExceptions?: boolean | undefined;
method getConfig
getConfig: ( componentName: string, callback: (result: ComponentConfig | null) => void) => void;
Define this if: you want to supply configurations programmatically based on names, e.g., to implement a naming convention.
See Also
method loadComponent
loadComponent: ( componentName: string, config: ComponentConfig, callback: (result: Definition | null) => void) => void;
Define this if: you want to take control over how component configurations are interpreted, e.g., if you do not want to use the standard 'viewModel/template' pair format.
See Also
method loadTemplate
loadTemplate: ( componentName: string, templateConfig: any, callback: (result: Node[] | null) => void) => void;
Define this if: you want to use custom logic to supply DOM nodes for a given template configuration (e.g., using an ajax request to fetch a template by URL).
See Also
method loadViewModel
loadViewModel: ( componentName: string, viewModelConfig: any, callback: (result: any) => void) => void;
Define this if: you want to use custom logic to supply a viewmodel factory for a given viewmodel configuration (e.g., integrating with a third-party module loader or dependency injection system).
See Also
interface TemplateElement
interface TemplateElement {}
property element
element: string | Node;
interface ViewModelFactoryFunction
interface ViewModelFactoryFunction {}
property createViewModel
createViewModel: (params: any, componentInfo: ComponentInfo) => any;
interface ViewModelFunction
interface ViewModelFunction {}
call signature
(params?: any): any;
interface ViewModelSharedInstance
interface ViewModelSharedInstance {}
property instance
instance: any;
type ViewModel
type ViewModel = | ViewModelFunction | ViewModelSharedInstance | ViewModelFactoryFunction | AMDModule;
Package Files (1)
Dependencies (0)
No dependencies.
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/knockout
.
- Markdown[](https://www.jsdocs.io/package/@types/knockout)
- HTML<a href="https://www.jsdocs.io/package/@types/knockout"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3887 ms. - Missing or incorrect documentation? Open an issue for this package.