@angular-wave/angular.ts 0.13.0 → 0.14.1
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.
- package/@types/angular.d.ts +1 -1
- package/@types/animations/animation.d.ts +1 -1
- package/@types/core/compile/attributes.d.ts +1 -1
- package/@types/core/di/ng-module/ng-module.d.ts +16 -31
- package/@types/core/filter/filter.d.ts +12 -13
- package/@types/core/scope/interface.d.ts +1 -1
- package/@types/core/scope/scope.d.ts +9 -10
- package/@types/directive/aria/aria.d.ts +3 -3
- package/@types/directive/class/class.d.ts +3 -3
- package/@types/directive/events/events.d.ts +2 -2
- package/@types/directive/form/form.d.ts +12 -2
- package/@types/directive/input/input.d.ts +2 -2
- package/@types/directive/messages/messages.d.ts +1 -1
- package/@types/directive/model/model.d.ts +12 -6
- package/@types/directive/model-options/model-options.d.ts +4 -1
- package/@types/directive/select/select.d.ts +1 -1
- package/@types/directive/style/style.d.ts +2 -2
- package/@types/directive/worker/interface.d.ts +2 -0
- package/@types/directive/worker/worker.d.ts +2 -0
- package/@types/filters/interface.d.ts +7 -1
- package/@types/interface.d.ts +3 -33
- package/@types/namespace.d.ts +35 -10
- package/@types/router/common/trace.d.ts +1 -0
- package/@types/router/directives/view-directive.d.ts +2 -2
- package/@types/router/transition/transition.d.ts +0 -1
- package/@types/router/url/url-config.d.ts +1 -1
- package/@types/router/url/url-rule.d.ts +0 -10
- package/@types/router/url/url-service.d.ts +2 -2
- package/@types/router/view/view.d.ts +0 -16
- package/@types/services/anchor-scroll/anchor-scroll.d.ts +1 -1
- package/@types/services/cookie/cookie.d.ts +2 -0
- package/@types/services/exception/exception.d.ts +1 -1
- package/@types/services/exception/interface.d.ts +2 -1
- package/@types/services/http/http.d.ts +10 -2
- package/@types/services/location/location.d.ts +10 -6
- package/@types/services/pubsub/pubsub.d.ts +45 -149
- package/@types/services/rest/rest.d.ts +4 -8
- package/@types/services/sce/sce.d.ts +1 -1
- package/@types/shared/common.d.ts +1 -1
- package/@types/shared/dom.d.ts +2 -2
- package/@types/shared/hof.d.ts +2 -2
- package/@types/shared/interface.d.ts +1 -0
- package/@types/shared/noderef.d.ts +1 -0
- package/@types/shared/strings.d.ts +6 -8
- package/@types/shared/utils.d.ts +83 -28
- package/LICENSE +1 -0
- package/dist/angular-ts.esm.js +9177 -5990
- package/dist/angular-ts.umd.js +9177 -5990
- package/dist/angular-ts.umd.min.js +1 -1
- package/package.json +1 -6
package/@types/shared/utils.d.ts
CHANGED
|
@@ -57,13 +57,7 @@ export function isObject(value: any): boolean;
|
|
|
57
57
|
* @returns {boolean} True if `value` is an `Object` with a null prototype
|
|
58
58
|
*/
|
|
59
59
|
export function isBlankObject(value: any): boolean;
|
|
60
|
-
|
|
61
|
-
* Determines if a reference is a `String`.
|
|
62
|
-
*
|
|
63
|
-
* @param {*} value Reference to check.
|
|
64
|
-
* @returns {boolean} True if `value` is a `String`.
|
|
65
|
-
*/
|
|
66
|
-
export function isString(value: any): boolean;
|
|
60
|
+
export function isString(value: unknown): boolean;
|
|
67
61
|
/**
|
|
68
62
|
* Determines if a reference is a null.
|
|
69
63
|
*
|
|
@@ -78,6 +72,13 @@ export function isNull(value: any): boolean;
|
|
|
78
72
|
* @returns {boolean} True if `value` is null or undefined.
|
|
79
73
|
*/
|
|
80
74
|
export function isNullOrUndefined(obj: any): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Determines if a reference is not null or undefined.
|
|
77
|
+
*
|
|
78
|
+
* @param {*} obj Reference to check.
|
|
79
|
+
* @returns {boolean} True if `value` is null or undefined.
|
|
80
|
+
*/
|
|
81
|
+
export function notNullOrUndefined(obj: any): boolean;
|
|
81
82
|
/**
|
|
82
83
|
* Determines if a reference is a `Number`.
|
|
83
84
|
*
|
|
@@ -92,10 +93,7 @@ export function isNullOrUndefined(obj: any): boolean;
|
|
|
92
93
|
*/
|
|
93
94
|
export function isNumber(value: any): boolean;
|
|
94
95
|
/**
|
|
95
|
-
* @module angular
|
|
96
|
-
* @function isDate
|
|
97
96
|
*
|
|
98
|
-
* @description
|
|
99
97
|
* Determines if a value is a date.
|
|
100
98
|
*
|
|
101
99
|
* @param {*} value Reference to check.
|
|
@@ -180,10 +178,30 @@ export function snakeCase(name: any, separator: any): any;
|
|
|
180
178
|
/**
|
|
181
179
|
* Set or clear the hashkey for an object.
|
|
182
180
|
* @param obj object
|
|
183
|
-
* @param
|
|
184
|
-
*/
|
|
185
|
-
export function setHashKey(obj: any,
|
|
186
|
-
|
|
181
|
+
* @param hashkey the hashkey (!truthy to delete the hashkey)
|
|
182
|
+
*/
|
|
183
|
+
export function setHashKey(obj: any, hashkey: any): void;
|
|
184
|
+
/**
|
|
185
|
+
* Deeply extends a destination object with one or more source objects.
|
|
186
|
+
* Safely handles Dates, RegExps, DOM nodes, arrays, and nested objects.
|
|
187
|
+
* Ignores the `__proto__` key to prevent prototype pollution.
|
|
188
|
+
*
|
|
189
|
+
* @param {Object<string, any>} dst - The destination object to extend.
|
|
190
|
+
* @param {Array<Object<string, any>>} objs - Array of source objects to copy properties from.
|
|
191
|
+
* @param {boolean} [deep=false] - Whether to perform a deep merge of nested objects.
|
|
192
|
+
* @returns {Object<string, any>} The extended destination object.
|
|
193
|
+
*/
|
|
194
|
+
export function baseExtend(
|
|
195
|
+
dst: {
|
|
196
|
+
[x: string]: any;
|
|
197
|
+
},
|
|
198
|
+
objs: Array<{
|
|
199
|
+
[x: string]: any;
|
|
200
|
+
}>,
|
|
201
|
+
deep?: boolean,
|
|
202
|
+
): {
|
|
203
|
+
[x: string]: any;
|
|
204
|
+
};
|
|
187
205
|
/**
|
|
188
206
|
* Extends the destination object `dst` by copying own enumerable properties from the `src` object(s)
|
|
189
207
|
* to `dst`. You can specify multiple `src` objects. If you want to preserve original objects, you can do so
|
|
@@ -227,7 +245,7 @@ export function includes(array: any, obj: any): boolean;
|
|
|
227
245
|
* @returns {number} - The index of the removed value, or -1 if the value was not found.
|
|
228
246
|
*/
|
|
229
247
|
export function arrayRemove<T>(array: Array<T>, value: T): number;
|
|
230
|
-
export function simpleCompare(
|
|
248
|
+
export function simpleCompare(val1: any, val2: any): boolean;
|
|
231
249
|
/**
|
|
232
250
|
* Determines if two objects or two values are equivalent. Supports value types, regular
|
|
233
251
|
* expressions, arrays and objects.
|
|
@@ -286,7 +304,6 @@ export function simpleCompare(a: any, b: any): boolean;
|
|
|
286
304
|
</example>
|
|
287
305
|
*/
|
|
288
306
|
export function equals(o1: any, o2: any): boolean;
|
|
289
|
-
export function csp(): any;
|
|
290
307
|
/**
|
|
291
308
|
* throw error if the name given is hasOwnProperty
|
|
292
309
|
* @param {string} name the name to test
|
|
@@ -373,9 +390,9 @@ export function toKeyValue(obj: any): string;
|
|
|
373
390
|
* Tries to decode the URI component without throwing an exception.
|
|
374
391
|
*
|
|
375
392
|
* @param {string} value potential URI component to check.
|
|
376
|
-
* @returns {string|
|
|
393
|
+
* @returns {string|undefined}
|
|
377
394
|
*/
|
|
378
|
-
export function tryDecodeURIComponent(value: string): string |
|
|
395
|
+
export function tryDecodeURIComponent(value: string): string | undefined;
|
|
379
396
|
/**
|
|
380
397
|
* We need our custom method because encodeURIComponent is too aggressive and doesn't follow
|
|
381
398
|
* http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path
|
|
@@ -414,6 +431,39 @@ export function shallowCopy(src: any, dst: any): any;
|
|
|
414
431
|
* @param {string} errorMsg
|
|
415
432
|
*/
|
|
416
433
|
export function assert(argument: boolean, errorMsg?: string): void;
|
|
434
|
+
/**
|
|
435
|
+
* Validate a value using a predicate function.
|
|
436
|
+
* Throws if the predicate returns false.
|
|
437
|
+
* IMPORTANT: use this function only for developper errors and not for user/data errors
|
|
438
|
+
*
|
|
439
|
+
* @param {ng.Validator} fn - Predicate validator function.
|
|
440
|
+
* @param {*} arg - The value to validate.
|
|
441
|
+
* @param {string} name - Parameter name (included in error message).
|
|
442
|
+
* @returns {*} The validated value.
|
|
443
|
+
* @throws {TypeError} If the value does not satisfy the validator.
|
|
444
|
+
*/
|
|
445
|
+
export function validate(fn: ng.Validator, arg: any, name: string): any;
|
|
446
|
+
/**
|
|
447
|
+
* @param {*} arg - The value to validate.
|
|
448
|
+
* @param {string} name - Parameter name (included in error message).
|
|
449
|
+
* @returns {*} The validated value.
|
|
450
|
+
* @throws {TypeError} If the value does not satisfy the validator.
|
|
451
|
+
*/
|
|
452
|
+
export function validateRequired(arg: any, name: string): any;
|
|
453
|
+
/**
|
|
454
|
+
* @param {*} arg - The value to validate.
|
|
455
|
+
* @param {string} name - Parameter name (included in error message).
|
|
456
|
+
* @returns {*} The validated value.
|
|
457
|
+
* @throws {TypeError} If the value does not satisfy the validator.
|
|
458
|
+
*/
|
|
459
|
+
export function validateArray(arg: any, name: string): any;
|
|
460
|
+
/**
|
|
461
|
+
* @param {*} arg - The value to validate.
|
|
462
|
+
* @param {string} name - Parameter name (included in error message).
|
|
463
|
+
* @returns {*} The validated value.
|
|
464
|
+
* @throws {TypeError} If the value does not satisfy the validator.
|
|
465
|
+
*/
|
|
466
|
+
export function validateIsString(arg: any, name: string): any;
|
|
417
467
|
/**
|
|
418
468
|
* Throw error if the argument is falsy.
|
|
419
469
|
*/
|
|
@@ -429,12 +479,12 @@ export function assertArgFn(
|
|
|
429
479
|
*
|
|
430
480
|
* Omitted or undefined options will leave the corresponding configuration values unchanged.
|
|
431
481
|
*
|
|
432
|
-
* @param {
|
|
433
|
-
* @returns {
|
|
482
|
+
* @param {ng.ErrorHandlingConfig} [config]
|
|
483
|
+
* @returns {ng.ErrorHandlingConfig}
|
|
434
484
|
*/
|
|
435
485
|
export function errorHandlingConfig(
|
|
436
|
-
config?:
|
|
437
|
-
):
|
|
486
|
+
config?: ng.ErrorHandlingConfig,
|
|
487
|
+
): ng.ErrorHandlingConfig;
|
|
438
488
|
/**
|
|
439
489
|
* This object provides a utility for producing rich Error messages within
|
|
440
490
|
* AngularTS. It can be called as follows:
|
|
@@ -479,13 +529,13 @@ export function hashKey(obj: any): string;
|
|
|
479
529
|
* Merges two class name values into a single space-separated string.
|
|
480
530
|
* Accepts strings, arrays of strings, or null/undefined values.
|
|
481
531
|
*
|
|
482
|
-
* @param {string | string[] | null | undefined}
|
|
483
|
-
* @param {string | string[] | null | undefined}
|
|
532
|
+
* @param {string | string[] | null | undefined} firstClass - The first class name(s).
|
|
533
|
+
* @param {string | string[] | null | undefined} secondClass - The second class name(s).
|
|
484
534
|
* @returns {string} A single string containing all class names separated by spaces.
|
|
485
535
|
*/
|
|
486
536
|
export function mergeClasses(
|
|
487
|
-
|
|
488
|
-
|
|
537
|
+
firstClass: string | string[] | null | undefined,
|
|
538
|
+
secondClass: string | string[] | null | undefined,
|
|
489
539
|
): string;
|
|
490
540
|
/**
|
|
491
541
|
* Converts all accepted directives format into proper directive name.
|
|
@@ -538,10 +588,10 @@ export function callBackAfterFirst(fn: Function): Function;
|
|
|
538
588
|
/**
|
|
539
589
|
* Delays execution for a specified number of milliseconds.
|
|
540
590
|
*
|
|
541
|
-
* @param {number} [
|
|
591
|
+
* @param {number} [timeout=0] - The number of milliseconds to wait. Defaults to 0.
|
|
542
592
|
* @returns {Promise<void>} A promise that resolves after the delay.
|
|
543
593
|
*/
|
|
544
|
-
export function wait(
|
|
594
|
+
export function wait(timeout?: number): Promise<void>;
|
|
545
595
|
/**
|
|
546
596
|
* Checks if a given string starts with a specified substring.
|
|
547
597
|
*
|
|
@@ -581,6 +631,11 @@ export function instantiateWasm(
|
|
|
581
631
|
exports: WebAssembly.Exports;
|
|
582
632
|
module: WebAssembly.Module;
|
|
583
633
|
}>;
|
|
634
|
+
/**
|
|
635
|
+
* @param {*} fn
|
|
636
|
+
* @returns {boolean}
|
|
637
|
+
*/
|
|
638
|
+
export function isArrowFunction(fn: any): boolean;
|
|
584
639
|
export const isProxySymbol: unique symbol;
|
|
585
640
|
export const BADARG: "badarg";
|
|
586
641
|
export const BADARGKEY: "badarg: key";
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
The MIT License
|
|
2
2
|
|
|
3
3
|
Copyright (c) 2010-2020 Google LLC. http://angularjs.org
|
|
4
|
+
Copyright (c) 2021-present Angular Wave contributors. https://angular-wave.github.io/angular.ts/
|
|
4
5
|
|
|
5
6
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
7
|
of this software and associated documentation files (the "Software"), to deal
|