dotvvm-types 4.2.0-preview02-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 +15 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dotvvm-types",
3
- "version": "4.2.0-preview02-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;
@@ -168,7 +176,7 @@ declare module "utils/evaluator" {
168
176
  * @returns found property as unwrapped object
169
177
  */
170
178
  export function traverseContext(context: any, path: string): any;
171
- export function findPathToChildObject(vm: any, child: any, path: string): string | null;
179
+ export function findPathToChildObservable(vm: any, child: any, path: string): string | null;
172
180
  export function getDataSourceItems(viewModel: any): Array<KnockoutObservable<any>>;
173
181
  export function wrapObservable(func: () => any, isArray?: boolean): KnockoutComputed<any>;
174
182
  export const unwrapComputedProperty: (obs: any) => any;
@@ -191,7 +199,9 @@ declare module "state-manager" {
191
199
  export const currentStateSymbol: unique symbol;
192
200
  export const notifySymbol: unique symbol;
193
201
  export const lastSetErrorSymbol: unique symbol;
194
- const updateSymbol: unique symbol;
202
+ export const internalPropCache: unique symbol;
203
+ export const updateSymbol: unique symbol;
204
+ export const updatePropertySymbol: unique symbol;
195
205
  export function getIsViewModelUpdating(): boolean;
196
206
  export type UpdatableObjectExtensions<T> = {
197
207
  [notifySymbol]: (newValue: T) => void;
@@ -677,7 +687,8 @@ declare module "binding-handlers/register" {
677
687
  export default _default_12;
678
688
  }
679
689
  declare module "postback/staticCommand" {
680
- export function staticCommandPostback(command: string, args: any[], options: PostbackOptions): Promise<any>;
690
+ export function resolveRelativeValidationPaths(paths: string[] | null | undefined, context: KnockoutBindingContext | undefined): (string | null)[] | undefined;
691
+ export function staticCommandPostback(command: string, args: any[], options: PostbackOptions, paths: string[] | null | undefined): Promise<any>;
681
692
  }
682
693
  declare module "controls/routeLink" {
683
694
  export function buildRouteUrl(routePath: string, params: any): string;
@@ -940,7 +951,7 @@ declare type PostbackOptions = {
940
951
  readonly args: any[];
941
952
  readonly sender?: HTMLElement;
942
953
  readonly viewModel?: any;
943
- readonly knockoutContext?: any;
954
+ readonly knockoutContext?: KnockoutBindingContext;
944
955
  serverResponseObject?: any;
945
956
  validationTargetPath?: string;
946
957
  abortSignal?: AbortSignal;