@types/knockout 3.4.71 → 3.4.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
knockout/LICENSE CHANGED
File without changes
knockout/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for Knockout (http://knockoutjs.com).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/knockout.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 06 Jul 2021 22:02:36 GMT
11
+ * Last updated: Thu, 14 Sep 2023 01:49:18 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `ko`
14
14
 
knockout/index.d.ts CHANGED
@@ -42,16 +42,16 @@ interface KnockoutObservableFunctions<T> {
42
42
  // The functions of observable arrays that don't mutate the array
43
43
  interface KnockoutReadonlyObservableArrayFunctions<T> {
44
44
  /**
45
- * Returns the index of the first occurrence of a value in an array.
46
- * @param searchElement The value to locate in the array.
47
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
48
- */
45
+ * Returns the index of the first occurrence of a value in an array.
46
+ * @param searchElement The value to locate in the array.
47
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
48
+ */
49
49
  indexOf(searchElement: T, fromIndex?: number): number;
50
50
  /**
51
- * Returns a section of an array.
52
- * @param start The beginning of the specified portion of the array.
53
- * @param end The end of the specified portion of the array.
54
- */
51
+ * Returns a section of an array.
52
+ * @param start The beginning of the specified portion of the array.
53
+ * @param end The end of the specified portion of the array.
54
+ */
55
55
  slice(start: number, end?: number): T[];
56
56
  }
57
57
  // The functions of observable arrays that mutate the array
@@ -152,7 +152,7 @@ interface KnockoutObservableArrayFunctions<T> extends KnockoutReadonlyObservable
152
152
  interface KnockoutSubscribableStatic {
153
153
  fn: KnockoutSubscribableFunctions<any>;
154
154
 
155
- new <T>(): KnockoutSubscribable<T>;
155
+ new<T>(): KnockoutSubscribable<T>;
156
156
  }
157
157
 
158
158
  interface KnockoutSubscription {
@@ -188,10 +188,10 @@ interface KnockoutSubscribable<T> extends KnockoutSubscribableFunctions<T> {
188
188
  * Customizes observables basic functionality.
189
189
  * @param requestedExtenders Name of the extender feature and its value, e.g. { notify: 'always' }, { rateLimit: 50 }
190
190
  */
191
- extend(requestedExtenders: { [key: string]: any; }): KnockoutSubscribable<T>;
191
+ extend(requestedExtenders: { [key: string]: any }): KnockoutSubscribable<T>;
192
192
  /**
193
- * Gets total number of subscribers.
194
- */
193
+ * Gets total number of subscribers.
194
+ */
195
195
  getSubscriptionsCount(): number;
196
196
  /**
197
197
  * Gets number of subscribers of a particular event.
@@ -246,7 +246,7 @@ interface KnockoutComputed<T> extends KnockoutReadonlyComputed<T>, KnockoutObser
246
246
  * Customizes observables basic functionality.
247
247
  * @param requestedExtenders Name of the extender feature and it's value, e.g. { notify: 'always' }, { rateLimit: 50 }
248
248
  */
249
- extend(requestedExtenders: { [key: string]: any; }): KnockoutComputed<T>;
249
+ extend(requestedExtenders: { [key: string]: any }): KnockoutComputed<T>;
250
250
  }
251
251
 
252
252
  interface KnockoutObservableArrayStatic {
@@ -259,9 +259,15 @@ interface KnockoutObservableArrayStatic {
259
259
  * While all observable arrays are writable at runtime, this type is analogous to the native ReadonlyArray type:
260
260
  * casting an observable array to this type expresses the intention that it shouldn't be mutated.
261
261
  */
262
- interface KnockoutReadonlyObservableArray<T> extends KnockoutReadonlyObservable<ReadonlyArray<T>>, KnockoutReadonlyObservableArrayFunctions<T> {
262
+ interface KnockoutReadonlyObservableArray<T>
263
+ extends KnockoutReadonlyObservable<ReadonlyArray<T>>, KnockoutReadonlyObservableArrayFunctions<T>
264
+ {
263
265
  // NOTE: Keep in sync with KnockoutObservableArray<T>, see note on KnockoutObservableArray<T>
264
- subscribe(callback: (newValue: KnockoutArrayChange<T>[]) => void, target: any, event: "arrayChange"): KnockoutSubscription;
266
+ subscribe(
267
+ callback: (newValue: KnockoutArrayChange<T>[]) => void,
268
+ target: any,
269
+ event: "arrayChange",
270
+ ): KnockoutSubscription;
265
271
  subscribe(callback: (newValue: T[]) => void, target: any, event: "beforeChange"): KnockoutSubscription;
266
272
  subscribe(callback: (newValue: T[]) => void, target?: any, event?: "change"): KnockoutSubscription;
267
273
  subscribe<U>(callback: (newValue: U) => void, target: any, event: string): KnockoutSubscription;
@@ -273,12 +279,16 @@ interface KnockoutReadonlyObservableArray<T> extends KnockoutReadonlyObservable<
273
279
  So it extends KnockoutObservable<T[]> and duplicates the subscribe definitions, which should be kept in sync
274
280
  */
275
281
  interface KnockoutObservableArray<T> extends KnockoutObservable<T[]>, KnockoutObservableArrayFunctions<T> {
276
- subscribe(callback: (newValue: KnockoutArrayChange<T>[]) => void, target: any, event: "arrayChange"): KnockoutSubscription;
282
+ subscribe(
283
+ callback: (newValue: KnockoutArrayChange<T>[]) => void,
284
+ target: any,
285
+ event: "arrayChange",
286
+ ): KnockoutSubscription;
277
287
  subscribe(callback: (newValue: T[]) => void, target: any, event: "beforeChange"): KnockoutSubscription;
278
288
  subscribe(callback: (newValue: T[]) => void, target?: any, event?: "change"): KnockoutSubscription;
279
289
  subscribe<U>(callback: (newValue: U) => void, target: any, event: string): KnockoutSubscription;
280
290
 
281
- extend(requestedExtenders: { [key: string]: any; }): KnockoutObservableArray<T>;
291
+ extend(requestedExtenders: { [key: string]: any }): KnockoutObservableArray<T>;
282
292
  }
283
293
 
284
294
  interface KnockoutObservableStatic {
@@ -286,8 +296,8 @@ interface KnockoutObservableStatic {
286
296
 
287
297
  <T>(value: T): KnockoutObservable<T>;
288
298
  <T>(value: any): KnockoutObservable<T>;
289
- <T = any>(value: null): KnockoutObservable<T | null>
290
- <T = any>(): KnockoutObservable<T | undefined>
299
+ <T = any>(value: null): KnockoutObservable<T | null>;
300
+ <T = any>(): KnockoutObservable<T | undefined>;
291
301
  }
292
302
 
293
303
  /**
@@ -301,8 +311,8 @@ interface KnockoutReadonlyObservable<T> extends KnockoutSubscribable<T>, Knockou
301
311
  * Returns the current value of the computed observable without creating a dependency.
302
312
  */
303
313
  peek(): T;
304
- valueHasMutated?: { (): void; } | undefined;
305
- valueWillMutate?: { (): void; } | undefined;
314
+ valueHasMutated?: { (): void } | undefined;
315
+ valueWillMutate?: { (): void } | undefined;
306
316
  }
307
317
 
308
318
  interface KnockoutObservable<T> extends KnockoutReadonlyObservable<T> {
@@ -313,7 +323,7 @@ interface KnockoutObservable<T> extends KnockoutReadonlyObservable<T> {
313
323
  * Customizes observables basic functionality.
314
324
  * @param requestedExtenders Name of the extender feature and it's value, e.g. { notify: 'always' }, { rateLimit: 50 }
315
325
  */
316
- extend(requestedExtenders: { [key: string]: any; }): KnockoutObservable<T>;
326
+ extend(requestedExtenders: { [key: string]: any }): KnockoutObservable<T>;
317
327
  }
318
328
 
319
329
  interface KnockoutComputedOptions<T> {
@@ -370,15 +380,20 @@ interface KnockoutBindingContext {
370
380
  * Clones the current Binding Context, adding extra properties to it.
371
381
  * @param properties object with properties to be added in the binding context.
372
382
  */
373
- extend(properties: { [key: string]: any; } | (() => { [key: string]: any; })): KnockoutBindingContext;
383
+ extend(properties: { [key: string]: any } | (() => { [key: string]: any })): KnockoutBindingContext;
374
384
  /**
375
- * This returns a new binding context whose viewmodel is the first parameter and whose $parentContext is the current bindingContext.
385
+ * This returns a new binding context whose viewmodel is the first parameter and whose $parentContext is the current bindingContext.
376
386
  * @param dataItemOrAccessor The binding context of the children.
377
387
  * @param dataItemAlias An alias for the data item in descendant contexts.
378
388
  * @param extendCallback Function to be called.
379
389
  * @param options Further options.
380
390
  */
381
- createChildContext(dataItemOrAccessor: any, dataItemAlias?: string, extendCallback?: Function, options?: { "exportDependencies": boolean }): any;
391
+ createChildContext(
392
+ dataItemOrAccessor: any,
393
+ dataItemAlias?: string,
394
+ extendCallback?: Function,
395
+ options?: { "exportDependencies": boolean },
396
+ ): any;
382
397
  }
383
398
 
384
399
  interface KnockoutAllBindingsAccessor {
@@ -389,10 +404,28 @@ interface KnockoutAllBindingsAccessor {
389
404
 
390
405
  interface KnockoutBindingHandler<E extends Node = any, V = any, VM = any> {
391
406
  after?: Array<string> | undefined;
392
- init?: ((element: E, valueAccessor: () => V, allBindingsAccessor: KnockoutAllBindingsAccessor, viewModel: VM, bindingContext: KnockoutBindingContext) => void | { controlsDescendantBindings: boolean; }) | undefined;
393
- update?: ((element: E, valueAccessor: () => V, allBindingsAccessor: KnockoutAllBindingsAccessor, viewModel: VM, bindingContext: KnockoutBindingContext) => void) | undefined;
407
+ init?:
408
+ | ((
409
+ element: E,
410
+ valueAccessor: () => V,
411
+ allBindingsAccessor: KnockoutAllBindingsAccessor,
412
+ viewModel: VM,
413
+ bindingContext: KnockoutBindingContext,
414
+ ) => void | { controlsDescendantBindings: boolean })
415
+ | undefined;
416
+ update?:
417
+ | ((
418
+ element: E,
419
+ valueAccessor: () => V,
420
+ allBindingsAccessor: KnockoutAllBindingsAccessor,
421
+ viewModel: VM,
422
+ bindingContext: KnockoutBindingContext,
423
+ ) => void)
424
+ | undefined;
394
425
  options?: any;
395
- preprocess?: ((value: string, name: string, addBindingCallback?: (name: string, value: string) => void) => string) | undefined;
426
+ preprocess?:
427
+ | ((value: string, name: string, addBindingCallback?: (name: string, value: string) => void) => string)
428
+ | undefined;
396
429
  [s: string]: any;
397
430
  }
398
431
 
@@ -441,16 +474,16 @@ interface KnockoutMemoization {
441
474
  parseMemoText(memoText: string): string;
442
475
  }
443
476
 
444
- interface KnockoutVirtualElement { }
477
+ interface KnockoutVirtualElement {}
445
478
 
446
479
  interface KnockoutVirtualElements {
447
- allowedBindings: { [bindingName: string]: boolean; };
480
+ allowedBindings: { [bindingName: string]: boolean };
448
481
  emptyNode(node: KnockoutVirtualElement): void;
449
482
  firstChild(node: KnockoutVirtualElement): KnockoutVirtualElement;
450
483
  insertAfter(container: KnockoutVirtualElement, nodeToInsert: Node, insertAfter: Node): void;
451
484
  nextSibling(node: KnockoutVirtualElement): Node;
452
485
  prepend(node: KnockoutVirtualElement, toInsert: Node): void;
453
- setDomNodeChildren(node: KnockoutVirtualElement, newChildren: { length: number;[index: number]: Node; }): void;
486
+ setDomNodeChildren(node: KnockoutVirtualElement, newChildren: { length: number; [index: number]: Node }): void;
454
487
  childNodes(node: KnockoutVirtualElement): Node[];
455
488
  }
456
489
 
@@ -459,7 +492,7 @@ interface KnockoutExtenders {
459
492
  notify(target: any, notifyWhen: string): any;
460
493
 
461
494
  rateLimit(target: any, timeout: number): any;
462
- rateLimit(target: any, options: { timeout: number; method?: string | undefined; }): any;
495
+ rateLimit(target: any, options: { timeout: number; method?: string | undefined }): any;
463
496
 
464
497
  trackArrayChanges(target: any): any;
465
498
  }
@@ -597,10 +630,9 @@ interface KnockoutTemplateAnonymous extends KnockoutTemplateSourcesDomElement {
597
630
  }
598
631
 
599
632
  interface KnockoutTemplateSources {
600
-
601
633
  domElement: {
602
- prototype: KnockoutTemplateSourcesDomElement
603
- new(element: Element): KnockoutTemplateSourcesDomElement
634
+ prototype: KnockoutTemplateSourcesDomElement;
635
+ new(element: Element): KnockoutTemplateSourcesDomElement;
604
636
  };
605
637
 
606
638
  anonymousTemplate: {
@@ -614,7 +646,6 @@ interface KnockoutTemplateSources {
614
646
  //////////////////////////////////
615
647
 
616
648
  interface KnockoutNativeTemplateEngine extends KnockoutTemplateEngine {
617
-
618
649
  renderTemplateSource(templateSource: Object, bindingContext?: KnockoutBindingContext, options?: Object): any[];
619
650
  }
620
651
 
@@ -623,12 +654,16 @@ interface KnockoutNativeTemplateEngine extends KnockoutTemplateEngine {
623
654
  //////////////////////////////////
624
655
 
625
656
  interface KnockoutTemplateEngine {
626
-
627
657
  createJavaScriptEvaluatorBlock(script: string): string;
628
658
 
629
659
  makeTemplateSource(template: any, templateDocument?: Document): any;
630
660
 
631
- renderTemplate(template: any, bindingContext: KnockoutBindingContext, options: Object, templateDocument: Document): any;
661
+ renderTemplate(
662
+ template: any,
663
+ bindingContext: KnockoutBindingContext,
664
+ options: Object,
665
+ templateDocument: Document,
666
+ ): any;
632
667
 
633
668
  isTemplateRewritten(template: any, templateDocument: Document): boolean;
634
669
 
@@ -659,9 +694,17 @@ interface KnockoutStatic {
659
694
 
660
695
  applyBindings(viewModelOrBindingContext?: any, rootNode?: any): void;
661
696
  applyBindingsToDescendants(viewModelOrBindingContext: any, rootNode: any): void;
662
- applyBindingAccessorsToNode(node: Node, bindings: (bindingContext: KnockoutBindingContext, node: Node) => {}, bindingContext: KnockoutBindingContext): void;
697
+ applyBindingAccessorsToNode(
698
+ node: Node,
699
+ bindings: (bindingContext: KnockoutBindingContext, node: Node) => {},
700
+ bindingContext: KnockoutBindingContext,
701
+ ): void;
663
702
  applyBindingAccessorsToNode(node: Node, bindings: {}, bindingContext: KnockoutBindingContext): void;
664
- applyBindingAccessorsToNode(node: Node, bindings: (bindingContext: KnockoutBindingContext, node: Node) => {}, viewModel: any): void;
703
+ applyBindingAccessorsToNode(
704
+ node: Node,
705
+ bindings: (bindingContext: KnockoutBindingContext, node: Node) => {},
706
+ viewModel: any,
707
+ ): void;
665
708
  applyBindingAccessorsToNode(node: Node, bindings: {}, viewModel: any): void;
666
709
  applyBindingsToNode(node: Node, bindings: any, viewModelOrBindingContext?: any): any;
667
710
 
@@ -781,7 +824,6 @@ interface KnockoutStatic {
781
824
  //////////////////////////////////
782
825
 
783
826
  templateEngine: {
784
-
785
827
  prototype: KnockoutTemplateEngine;
786
828
 
787
829
  new(): KnockoutTemplateEngine;
@@ -792,9 +834,16 @@ interface KnockoutStatic {
792
834
  //////////////////////////////////
793
835
 
794
836
  templateRewriting: {
795
-
796
- ensureTemplateIsRewritten(template: Node, templateEngine: KnockoutTemplateEngine, templateDocument: Document): any;
797
- ensureTemplateIsRewritten(template: string, templateEngine: KnockoutTemplateEngine, templateDocument: Document): any;
837
+ ensureTemplateIsRewritten(
838
+ template: Node,
839
+ templateEngine: KnockoutTemplateEngine,
840
+ templateDocument: Document,
841
+ ): any;
842
+ ensureTemplateIsRewritten(
843
+ template: string,
844
+ templateEngine: KnockoutTemplateEngine,
845
+ templateDocument: Document,
846
+ ): any;
798
847
 
799
848
  memoizeBindingAttributeSyntax(htmlString: string, templateEngine: KnockoutTemplateEngine): any;
800
849
 
@@ -806,7 +855,6 @@ interface KnockoutStatic {
806
855
  //////////////////////////////////
807
856
 
808
857
  nativeTemplateEngine: {
809
-
810
858
  prototype: KnockoutNativeTemplateEngine;
811
859
 
812
860
  new(): KnockoutNativeTemplateEngine;
@@ -819,7 +867,6 @@ interface KnockoutStatic {
819
867
  //////////////////////////////////
820
868
 
821
869
  jqueryTmplTemplateEngine: {
822
-
823
870
  prototype: KnockoutTemplateEngine;
824
871
 
825
872
  renderTemplateSource(templateSource: Object, bindingContext: KnockoutBindingContext, options: Object): Node[];
@@ -835,19 +882,91 @@ interface KnockoutStatic {
835
882
 
836
883
  setTemplateEngine(templateEngine: KnockoutNativeTemplateEngine | undefined): void;
837
884
 
838
- renderTemplate(template: Function, dataOrBindingContext: KnockoutBindingContext, options: Object, targetNodeOrNodeArray: Node, renderMode: string): any;
839
- renderTemplate(template: any, dataOrBindingContext: KnockoutBindingContext, options: Object, targetNodeOrNodeArray: Node, renderMode: string): any;
840
- renderTemplate(template: Function, dataOrBindingContext: any, options: Object, targetNodeOrNodeArray: Node, renderMode: string): any;
841
- renderTemplate(template: any, dataOrBindingContext: any, options: Object, targetNodeOrNodeArray: Node, renderMode: string): any;
842
- renderTemplate(template: Function, dataOrBindingContext: KnockoutBindingContext, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any;
843
- renderTemplate(template: any, dataOrBindingContext: KnockoutBindingContext, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any;
844
- renderTemplate(template: Function, dataOrBindingContext: any, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any;
845
- renderTemplate(template: any, dataOrBindingContext: any, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any;
846
-
847
- renderTemplateForEach(template: Function, arrayOrObservableArray: any[], options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any;
848
- renderTemplateForEach(template: any, arrayOrObservableArray: any[], options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any;
849
- renderTemplateForEach(template: Function, arrayOrObservableArray: KnockoutObservable<any>, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any;
850
- renderTemplateForEach(template: any, arrayOrObservableArray: KnockoutObservable<any>, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any;
885
+ renderTemplate(
886
+ template: Function,
887
+ dataOrBindingContext: KnockoutBindingContext,
888
+ options: Object,
889
+ targetNodeOrNodeArray: Node,
890
+ renderMode: string,
891
+ ): any;
892
+ renderTemplate(
893
+ template: any,
894
+ dataOrBindingContext: KnockoutBindingContext,
895
+ options: Object,
896
+ targetNodeOrNodeArray: Node,
897
+ renderMode: string,
898
+ ): any;
899
+ renderTemplate(
900
+ template: Function,
901
+ dataOrBindingContext: any,
902
+ options: Object,
903
+ targetNodeOrNodeArray: Node,
904
+ renderMode: string,
905
+ ): any;
906
+ renderTemplate(
907
+ template: any,
908
+ dataOrBindingContext: any,
909
+ options: Object,
910
+ targetNodeOrNodeArray: Node,
911
+ renderMode: string,
912
+ ): any;
913
+ renderTemplate(
914
+ template: Function,
915
+ dataOrBindingContext: KnockoutBindingContext,
916
+ options: Object,
917
+ targetNodeOrNodeArray: Node[],
918
+ renderMode: string,
919
+ ): any;
920
+ renderTemplate(
921
+ template: any,
922
+ dataOrBindingContext: KnockoutBindingContext,
923
+ options: Object,
924
+ targetNodeOrNodeArray: Node[],
925
+ renderMode: string,
926
+ ): any;
927
+ renderTemplate(
928
+ template: Function,
929
+ dataOrBindingContext: any,
930
+ options: Object,
931
+ targetNodeOrNodeArray: Node[],
932
+ renderMode: string,
933
+ ): any;
934
+ renderTemplate(
935
+ template: any,
936
+ dataOrBindingContext: any,
937
+ options: Object,
938
+ targetNodeOrNodeArray: Node[],
939
+ renderMode: string,
940
+ ): any;
941
+
942
+ renderTemplateForEach(
943
+ template: Function,
944
+ arrayOrObservableArray: any[],
945
+ options: Object,
946
+ targetNode: Node,
947
+ parentBindingContext: KnockoutBindingContext,
948
+ ): any;
949
+ renderTemplateForEach(
950
+ template: any,
951
+ arrayOrObservableArray: any[],
952
+ options: Object,
953
+ targetNode: Node,
954
+ parentBindingContext: KnockoutBindingContext,
955
+ ): any;
956
+ renderTemplateForEach(
957
+ template: Function,
958
+ arrayOrObservableArray: KnockoutObservable<any>,
959
+ options: Object,
960
+ targetNode: Node,
961
+ parentBindingContext: KnockoutBindingContext,
962
+ ): any;
963
+ renderTemplateForEach(
964
+ template: any,
965
+ arrayOrObservableArray: KnockoutObservable<any>,
966
+ options: Object,
967
+ targetNode: Node,
968
+ parentBindingContext: KnockoutBindingContext,
969
+ ): any;
851
970
 
852
971
  /**
853
972
  * Executes a callback function inside a computed observable, without creating a dependecy between it and the observables inside the function.
@@ -877,7 +996,13 @@ interface KnockoutStatic {
877
996
  Note that if you need to write to the viewModel without an observable property,
878
997
  you need to set ko.expressionRewriting.twoWayBindings[key] = true; *before* the binding evaluation.
879
998
  */
880
- writeValueToProperty: (property: KnockoutObservable<any> | any, allBindings: KnockoutAllBindingsAccessor, key: string, value: any, checkIfDifferent?: boolean) => void;
999
+ writeValueToProperty: (
1000
+ property: KnockoutObservable<any> | any,
1001
+ allBindings: KnockoutAllBindingsAccessor,
1002
+ key: string,
1003
+ value: any,
1004
+ checkIfDifferent?: boolean,
1005
+ ) => void;
881
1006
  };
882
1007
 
883
1008
  /////////////////////////////////
@@ -885,14 +1010,13 @@ interface KnockoutStatic {
885
1010
  bindingProvider: {
886
1011
  instance: KnockoutBindingProvider;
887
1012
  new(): KnockoutBindingProvider;
888
- }
1013
+ };
889
1014
 
890
1015
  /////////////////////////////////
891
1016
  // selectExtensions.js
892
1017
  /////////////////////////////////
893
1018
 
894
1019
  selectExtensions: {
895
-
896
1020
  readValue(element: HTMLElement): any;
897
1021
 
898
1022
  writeValue(element: HTMLElement, value: any, allowUnset?: boolean): void;
@@ -905,9 +1029,9 @@ interface KnockoutStatic {
905
1029
  /////////////////////////////////
906
1030
 
907
1031
  options: {
908
- deferUpdates: boolean,
1032
+ deferUpdates: boolean;
909
1033
 
910
- useOnlyNativeEvents: boolean
1034
+ useOnlyNativeEvents: boolean;
911
1035
  };
912
1036
 
913
1037
  /////////////////////////////////
@@ -926,7 +1050,7 @@ interface KnockoutStatic {
926
1050
  interface KnockoutBindingProvider {
927
1051
  nodeHasBindings(node: Node): boolean;
928
1052
  getBindings(node: Node, bindingContext: KnockoutBindingContext): {};
929
- getBindingAccessors?(node: Node, bindingContext: KnockoutBindingContext): { [key: string]: string; };
1053
+ getBindingAccessors?(node: Node, bindingContext: KnockoutBindingContext): { [key: string]: string };
930
1054
  }
931
1055
 
932
1056
  interface KnockoutComputedContext {
@@ -948,7 +1072,7 @@ interface KnockoutComputedContext {
948
1072
  //
949
1073
  declare namespace KnockoutComponentTypes {
950
1074
  type ViewModel = ViewModelFunction | ViewModelSharedInstance | ViewModelFactoryFunction | AMDModule;
951
-
1075
+
952
1076
  interface Config<T> {
953
1077
  viewModel?: T | undefined;
954
1078
  template: string | Node[] | DocumentFragment | TemplateElement | AMDModule;
@@ -1001,7 +1125,11 @@ declare namespace KnockoutComponentTypes {
1001
1125
  * 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.
1002
1126
  * @see {@link https://knockoutjs.com/documentation/component-loaders.html}
1003
1127
  */
1004
- loadComponent?(componentName: string, config: ComponentConfig, callback: (result: Definition | null) => void): void;
1128
+ loadComponent?(
1129
+ componentName: string,
1130
+ config: ComponentConfig,
1131
+ callback: (result: Definition | null) => void,
1132
+ ): void;
1005
1133
  /**
1006
1134
  * 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).
1007
1135
  * @see {@link https://knockoutjs.com/documentation/component-loaders.html}
@@ -1017,18 +1145,20 @@ declare namespace KnockoutComponentTypes {
1017
1145
 
1018
1146
  interface Definition {
1019
1147
  template: Node[];
1020
- createViewModel?(params: any, options: { element: Node; }): any;
1148
+ createViewModel?(params: any, options: { element: Node }): any;
1021
1149
  }
1022
1150
  }
1023
1151
 
1024
1152
  interface KnockoutComponents {
1025
-
1026
1153
  /**
1027
1154
  * Registers a component, in the default component loader, to be used by name in the component binding.
1028
1155
  * @param componentName Component name. Will be used for your custom HTML tag name.
1029
1156
  * @param config Component configuration.
1030
1157
  */
1031
- register<T = KnockoutComponentTypes.ViewModel>(componentName: string, config: KnockoutComponentTypes.Config<T> | KnockoutComponentTypes.EmptyConfig): void;
1158
+ register<T = KnockoutComponentTypes.ViewModel>(
1159
+ componentName: string,
1160
+ config: KnockoutComponentTypes.Config<T> | KnockoutComponentTypes.EmptyConfig,
1161
+ ): void;
1032
1162
  /**
1033
1163
  * Determine if a component with the specified name is already registered in the default component loader.
1034
1164
  * @param componentName Component name.
@@ -1049,7 +1179,7 @@ interface KnockoutComponents {
1049
1179
  * Clears the cache knockout creates to speed up component loading, for a given component.
1050
1180
  * @param componentName Component name.
1051
1181
  */
1052
- clearCachedDefinition(componentName: string): void
1182
+ clearCachedDefinition(componentName: string): void;
1053
1183
  defaultLoader: KnockoutComponentTypes.Loader;
1054
1184
  loaders: KnockoutComponentTypes.Loader[];
1055
1185
  /**
knockout/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/knockout",
3
- "version": "3.4.71",
3
+ "version": "3.4.73",
4
4
  "description": "TypeScript definitions for Knockout",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/knockout",
6
6
  "license": "MIT",
@@ -53,13 +53,6 @@
53
53
  ],
54
54
  "main": "",
55
55
  "types": "index.d.ts",
56
- "typesVersions": {
57
- "<=3.9": {
58
- "*": [
59
- "ts3.9/*"
60
- ]
61
- }
62
- },
63
56
  "repository": {
64
57
  "type": "git",
65
58
  "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
@@ -67,6 +60,6 @@
67
60
  },
68
61
  "scripts": {},
69
62
  "dependencies": {},
70
- "typesPublisherContentHash": "93534c77d1beb05378e21d8ad80e457c2b4557d6c06f6bb0120f8b644ff9a170",
71
- "typeScriptVersion": "3.6"
63
+ "typesPublisherContentHash": "1739f62f0d99683855cad759896175e48e649fc4bf4365ca482921995373510c",
64
+ "typeScriptVersion": "4.5"
72
65
  }