dotvvm-types 4.2.0-preview03-final → 4.2.0-preview04-final

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/types/index.d.ts +8 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dotvvm-types",
3
- "version": "4.2.0-preview03-final",
3
+ "version": "4.2.0-preview04-final",
4
4
  "description": "MVVM framework for ASP.NET",
5
5
  "types": "./types/index.d.ts",
6
6
  "repository": {
package/types/index.d.ts CHANGED
@@ -52,6 +52,10 @@ declare module "utils/knockout" {
52
52
  export function wrapObservable<T>(obj: T): KnockoutObservable<T>;
53
53
  export function wrapObservableObjectOrArray<T>(obj: T): KnockoutObservable<T> | KnockoutObservableArray<T>;
54
54
  export function isObservableArray(target: any): boolean;
55
+ /** If ko.options.deferUpdates is on,
56
+ * obs.notifySubscribers() will not invoke them if the value didn't change, because the equalityComparer is checked again when the notification runs.
57
+ * This function removes the equalityComparer, waits for all tasks and returns it */
58
+ export function hackInvokeNotifySubscribers(obs: KnockoutObservable<any>): void;
55
59
  }
56
60
  declare module "utils/objects" {
57
61
  export function isPrimitive(viewModel: any): boolean;
@@ -132,6 +136,10 @@ declare module "metadata/coercer" {
132
136
  export function tryCoerce(value: any, type: TypeDefinition | null | undefined, originalValue?: any): CoerceResult;
133
137
  export function coerce(value: any, type: TypeDefinition, originalValue?: any): any;
134
138
  }
139
+ declare module "utils/promise" {
140
+ /** Runs the callback in the next event loop cycle */
141
+ export const defer: <T>(callback: () => T) => Promise<T>;
142
+ }
135
143
  declare module "postback/updater" {
136
144
  export function cleanUpdatedControls(resultObject: any, updatedControls?: any): any;
137
145
  export function restoreUpdatedControls(resultObject: any, updatedControls: any): void;