• Version 3.4.77
  • Published
  • 48.5 kB
  • No dependencies
  • MIT license


npm i @types/knockout
yarn add @types/knockout
pnpm add @types/knockout


TypeScript definitions for knockout



variable ko

var ko: KnockoutStatic;


    namespace knockout

    module 'knockout' {}

      variable ko

      var ko: KnockoutStatic;

        namespace KnockoutComponentTypes

        namespace KnockoutComponentTypes {}

          interface AMDModule

          interface AMDModule {}

            property require

            require: string;

              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;

                                                method loadComponent

                                                loadComponent: (
                                                componentName: string,
                                                config: ComponentConfig,
                                                callback: (result: Definition | null) => void
                                                ) => void;

                                                method loadTemplate

                                                loadTemplate: (
                                                componentName: string,
                                                templateConfig: any,
                                                callback: (result: Node[] | null) => void
                                                ) => void;

                                                method loadViewModel

                                                loadViewModel: (
                                                componentName: string,
                                                viewModelConfig: any,
                                                callback: (result: any) => void
                                                ) => void;

                                                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.


                                                                  To add a badge like this onejsDocs.io badgeto 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
                                                                  • 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>