@types/knockout

  • Version 3.4.71
  • Published
  • 91.1 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 knockout

    module 'knockout' {}

      variable ko

      var ko: KnockoutStatic;

        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;
                                          (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;
                                                  (
                                                  componentName: string,
                                                  callback: (result: ComponentConfig<ViewModel>) => void
                                                  ): void;
                                                  };

                                                  method loadComponent

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

                                                  method loadTemplate

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

                                                  method loadViewModel

                                                  loadViewModel: {
                                                  (
                                                  componentName: string,
                                                  viewModelConfig: any,
                                                  callback: (result: any) => void
                                                  ): void;
                                                  (
                                                  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 (2)

                                                                    Dependencies (0)

                                                                    No dependencies.

                                                                    Dev Dependencies (0)

                                                                    No dev dependencies.

                                                                    Peer Dependencies (0)

                                                                    No peer dependencies.

                                                                    Badge

                                                                    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
                                                                      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](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>