@angular-wave/angular.ts 0.0.70 → 0.0.71

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.
@@ -2,11 +2,6 @@ export function $CompileProvider($provide: any, $$sanitizeUriProvider: any): voi
2
2
  export class $CompileProvider {
3
3
  constructor($provide: any, $$sanitizeUriProvider: any);
4
4
  /**
5
- * @ngdoc method
6
- * @name $compileProvider#directive
7
- * @kind function
8
- *
9
- * @description
10
5
  * Register a new directive with the compiler.
11
6
  *
12
7
  * @param {string|Object} name Name of the directive in camel-case (i.e. `ngBind` which will match
@@ -18,18 +13,14 @@ export class $CompileProvider {
18
13
  */
19
14
  directive: (name: string | any, directiveFactory: Function | any[]) => $CompileProvider;
20
15
  /**
21
- * @ngdoc method
22
- * @name $compileProvider#component
23
- * @module ng
24
16
  * @param {string|Object} name Name of the component in camelCase (i.e. `myComp` which will match `<my-comp>`),
25
17
  * or an object map of components where the keys are the names and the values are the component definition objects.
26
18
  * @param {Object} options Component definition object (a simplified
27
- * {@link ng.$compile#directive-definition-object directive definition object}),
19
+ * {directive definition object}),
28
20
  * with the following properties (all optional):
29
21
  *
30
22
  * - `controller` – `{(string|function()=}` – controller constructor function that should be
31
- * associated with newly created scope or the name of a {@link ng.$compile#-controller-
32
- * registered controller} if passed as a string. An empty `noop` function by default.
23
+ * associated with newly created scope or the name of a {controller} if passed as a string. An empty `noop` function by default.
33
24
  * - `controllerAs` – `{string=}` – identifier name for to reference the controller in the component's scope.
34
25
  * If present, the controller will be published to scope under the `controllerAs` name.
35
26
  * If not present, this will default to be `$ctrl`.
@@ -37,7 +28,7 @@ export class $CompileProvider {
37
28
  * returns an html template as a string which should be used as the contents of this component.
38
29
  * Empty string by default.
39
30
  *
40
- * If `template` is a function, then it is {@link auto.$injector#invoke injected} with
31
+ * If `template` is a function, then it is {injected} with
41
32
  * the following locals:
42
33
  *
43
34
  * - `$element` - Current element
@@ -46,7 +37,7 @@ export class $CompileProvider {
46
37
  * - `templateUrl` – `{string=|function()=}` – path or function that returns a path to an html
47
38
  * template that should be used as the contents of this component.
48
39
  *
49
- * If `templateUrl` is a function, then it is {@link auto.$injector#invoke injected} with
40
+ * If `templateUrl` is a function, then it is {injected} with
50
41
  * the following locals:
51
42
  *
52
43
  * - `$element` - Current element
@@ -54,57 +45,18 @@ export class $CompileProvider {
54
45
  *
55
46
  * - `bindings` – `{object=}` – defines bindings between DOM attributes and component properties.
56
47
  * Component properties are always bound to the component controller and not to the scope.
57
- * See {@link ng.$compile#-bindtocontroller- `bindToController`}.
58
- * - `transclude` – `{boolean=}` – whether {@link $compile#transclusion content transclusion} is enabled.
48
+ * See {`bindToController`}.
49
+ * - `transclude` – `{boolean=}` – whether {content transclusion} is enabled.
59
50
  * Disabled by default.
60
51
  * - `require` - `{Object<string, string>=}` - requires the controllers of other directives and binds them to
61
52
  * this component's controller. The object keys specify the property names under which the required
62
- * controllers (object values) will be bound. See {@link ng.$compile#-require- `require`}.
53
+ * controllers (object values) will be bound. See {`require`}.
63
54
  * - `$...` – additional properties to attach to the directive factory function and the controller
64
55
  * constructor function. (This is used by the component router to annotate)
65
56
  *
66
- * @returns {ng.$compileProvider} the compile provider itself, for chaining of function calls.
67
- * @description
68
- * Register a **component definition** with the compiler. This is a shorthand for registering a special
69
- * type of directive, which represents a self-contained UI component in your application. Such components
70
- * are always isolated (i.e. `scope: {}`) and are always restricted to elements (i.e. `restrict: 'E'`).
71
- *
72
- * Component definitions are very simple and do not require as much configuration as defining general
73
- * directives. Component definitions usually consist only of a template and a controller backing it.
74
- *
75
- * In order to make the definition easier, components enforce best practices like use of `controllerAs`,
76
- * `bindToController`. They always have **isolate scope** and are restricted to elements.
77
- *
78
- * Here are a few examples of how you would usually define components:
79
- *
80
- * ```js
81
- * let myMod = angular.module(...);
82
- * myMod.component('myComp', {
83
- * template: '<div>My name is {{$ctrl.name}}</div>',
84
- * controller: function() {
85
- * this.name = 'shahar';
86
- * }
87
- * });
88
- *
89
- * myMod.component('myComp', {
90
- * template: '<div>My name is {{$ctrl.name}}</div>',
91
- * bindings: {name: '@'}
92
- * });
93
- *
94
- * myMod.component('myComp', {
95
- * templateUrl: 'views/my-comp.html',
96
- * controller: 'MyCtrl',
97
- * controllerAs: 'ctrl',
98
- * bindings: {name: '@'}
99
- * });
100
- *
101
- * ```
102
- * For more examples, and an in-depth guide, see the {@link guide/component component guide}.
103
- *
104
- * <br />
105
- * See also {@link ng.$compileProvider#directive $compileProvider.directive()}.
57
+ * @returns {$CompileProvider} the compile provider itself, for chaining of function calls.
106
58
  */
107
- component: (name: string | any, options: any) => ng.$compileProvider;
59
+ component: (name: string | any, options: any) => $CompileProvider;
108
60
  /**
109
61
  * @ngdoc method
110
62
  * @name $compileProvider#aHrefSanitizationTrustedUrlList
@@ -127,11 +79,6 @@ export class $CompileProvider {
127
79
  */
128
80
  aHrefSanitizationTrustedUrlList: (regexp?: RegExp | undefined) => RegExp | $CompileProvider;
129
81
  /**
130
- * @ngdoc method
131
- * @name $compileProvider#imgSrcSanitizationTrustedUrlList
132
- * @kind function
133
- *
134
- * @description
135
82
  * Retrieves or overrides the default regular expression that is used for determining trusted safe
136
83
  * urls during img[src] sanitization.
137
84
  *
@@ -149,10 +96,6 @@ export class $CompileProvider {
149
96
  imgSrcSanitizationTrustedUrlList: (regexp?: RegExp | undefined) => RegExp | $CompileProvider;
150
97
  strictComponentBindingsEnabled: (enabled: any) => boolean | this;
151
98
  /**
152
- * @ngdoc method
153
- * @name $compileProvider#addPropertySecurityContext
154
- * @description
155
- *
156
99
  * Defines the security context for DOM properties bound by ng-prop-*.
157
100
  *
158
101
  * @param {string} elementName The element name or '*' to match any element.
@@ -161,7 +104,7 @@ export class $CompileProvider {
161
104
  * @returns {object} `this` for chaining
162
105
  */
163
106
  addPropertySecurityContext: (elementName: string, propertyName: string, ctx: string) => object;
164
- $get: (string | (($injector: import("../../core/di/internal-injector").InjectorService, $interpolate: any, $exceptionHandler: any, $templateRequest: any, $parse: any, $controller: any, $rootScope: any, $sce: any, $animate: any) => ($compileNodes: string | NodeList, transcludeFn: any, maxPriority: any, ignoreDirective: any, previousCompileContext: any) => (scope: any, cloneConnectFn: any, options: any) => string | NodeList | JQLite))[];
107
+ $get: (string | (($injector: import("../../core/di/internal-injector").InjectorService, $interpolate: any, $exceptionHandler: import("../exception-handler").ExceptionHandlerProvider, $templateRequest: any, $parse: import("../parser/parse").ParseService, $controller: any, $rootScope: import("../scope/scope").Scope, $sce: any, $animate: any) => ($compileNodes: string | NodeList, transcludeFn: any, maxPriority: any, ignoreDirective: any, previousCompileContext: any) => (scope: any, cloneConnectFn: any, options: any) => JQLite))[];
165
108
  }
166
109
  export namespace $CompileProvider {
167
110
  let $inject: string[];
@@ -1,9 +1,4 @@
1
1
  /**
2
- * @ngdoc provider
3
- * @name $interpolateProvider
4
- *
5
- *
6
- * @description
7
2
  *
8
3
  * Used for configuring the interpolation markup. Defaults to `{{` and `}}`.
9
4
  *
@@ -18,9 +13,6 @@
18
13
  export function $InterpolateProvider(): void;
19
14
  export class $InterpolateProvider {
20
15
  /**
21
- * @ngdoc method
22
- * @name $interpolateProvider#startSymbol
23
- * @description
24
16
  * Symbol to denote start of expression in the interpolated string. Defaults to `{{`.
25
17
  *
26
18
  * @param {string=} value new value to set the starting symbol to.
@@ -28,16 +20,13 @@ export class $InterpolateProvider {
28
20
  */
29
21
  startSymbol: (value?: string | undefined) => string | (Window & typeof globalThis);
30
22
  /**
31
- * @ngdoc method
32
- * @name $interpolateProvider#endSymbol
33
- * @description
34
23
  * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.
35
24
  *
36
25
  * @param {string=} value new value to set the ending symbol to.
37
26
  * @returns {string|self} Returns the symbol when used as getter and self if used as setter.
38
27
  */
39
28
  endSymbol: (value?: string | undefined) => string | (Window & typeof globalThis);
40
- $get: (string | (($parse: any, $exceptionHandler: import("../exception-handler").ErrorHandler, $sce: any) => {
29
+ $get: (string | (($parse: import("../parser/parse").ParseService, $exceptionHandler: import("../exception-handler").ErrorHandler, $sce: any) => {
41
30
  (text: string, mustHaveExpression?: boolean | undefined, trustedContext?: string | undefined, allOrNothing?: boolean | undefined): (arg0: context) => any;
42
31
  /**
43
32
  * @ngdoc method
@@ -223,6 +223,13 @@ export class Location {
223
223
  */
224
224
  state(state: any, ...args: any[]): any;
225
225
  $$state: any;
226
+ /**
227
+ * @param {string} _url
228
+ * @param {string} _url2
229
+ * @returns {boolean}
230
+ */
231
+ $$parseLinkUrl(_url: string, _url2: string): boolean;
232
+ $$parse(_url: any): void;
226
233
  }
227
234
  /**
228
235
  * This object is exposed as $location service when HTML5 mode is enabled and supported
@@ -241,7 +248,6 @@ export class LocationHtml5Url extends Location {
241
248
  */
242
249
  $$parse(url: string): void;
243
250
  $$normalizeUrl(url: any): string;
244
- $$parseLinkUrl: (url: any, relHref: any) => boolean;
245
251
  }
246
252
  /**
247
253
  * LocationHashbangUrl represents URL
@@ -264,7 +270,11 @@ export class LocationHashbangUrl extends Location {
264
270
  */
265
271
  $$parse(url: string): void;
266
272
  $$normalizeUrl(url: any): any;
267
- $$parseLinkUrl(url: any): boolean;
273
+ /**
274
+ * @param {string} url
275
+ * @returns {boolean}
276
+ */
277
+ $$parseLinkUrl(url: string): boolean;
268
278
  }
269
279
  export type DefaultPorts = {
270
280
  http: number;
@@ -2,11 +2,11 @@
2
2
  * @typedef {Object} CompiledExpressionProps
3
3
  * @property {boolean} literal - Indicates if the expression is a literal.
4
4
  * @property {boolean} constant - Indicates if the expression is constant.
5
- * @property {boolean} isPure
5
+ * @property {boolean} [isPure]
6
6
  * @property {boolean} oneTime
7
- * @property {function(import('../scope/scope').Scope, import('../scope/scope').WatchListener, boolean, CompiledExpression, string | ((scope: import('../scope/scope').Scope) => any)): any} $$watchDelegate
8
- * @property {any[]} inputs
9
- * @property {function(any, any): any} assign - Assigns a value to a context. If value is not provided,
7
+ * @property {function(import('../scope/scope').Scope, import('../scope/scope').WatchListener, boolean, CompiledExpression, string | ((scope: import('../scope/scope').Scope) => any) | CompiledExpression): any} [$$watchDelegate]
8
+ * @property {any[]|Function} inputs
9
+ * @property {function(any, any): any} [assign] - Assigns a value to a context. If value is not provided,
10
10
  */
11
11
  /**
12
12
  * @typedef {Function} CompiledExpressionFunction
@@ -22,7 +22,7 @@
22
22
  * @typedef {CompiledExpressionFunction & CompiledExpressionProps} CompiledExpression
23
23
  */
24
24
  /**
25
- * @typedef {function(string|function(import('../scope/scope').Scope):any, function(any, import('../scope/scope').Scope, any):any=, boolean=): CompiledExpression} ParseService
25
+ * @typedef {function(CompiledExpression|string|function(import('../scope/scope').Scope):any, function(any, import('../scope/scope').Scope, any):any=, boolean=): CompiledExpression} ParseService
26
26
  */
27
27
  export function $ParseProvider(): void;
28
28
  export class $ParseProvider {
@@ -59,15 +59,15 @@ export type CompiledExpressionProps = {
59
59
  * - Indicates if the expression is constant.
60
60
  */
61
61
  constant: boolean;
62
- isPure: boolean;
62
+ isPure?: boolean;
63
63
  oneTime: boolean;
64
- $$watchDelegate: (arg0: import("../scope/scope").Scope, arg1: import("../scope/scope").WatchListener, arg2: boolean, arg3: CompiledExpression, arg4: string | ((scope: import("../scope/scope").Scope) => any)) => any;
65
- inputs: any[];
64
+ $$watchDelegate?: (arg0: import("../scope/scope").Scope, arg1: import("../scope/scope").WatchListener, arg2: boolean, arg3: CompiledExpression, arg4: string | ((scope: import("../scope/scope").Scope) => any) | CompiledExpression) => any;
65
+ inputs: any[] | Function;
66
66
  /**
67
67
  * - Assigns a value to a context. If value is not provided,
68
68
  */
69
- assign: (arg0: any, arg1: any) => any;
69
+ assign?: (arg0: any, arg1: any) => any;
70
70
  };
71
71
  export type CompiledExpressionFunction = Function;
72
72
  export type CompiledExpression = CompiledExpressionFunction & CompiledExpressionProps;
73
- export type ParseService = (arg0: string | ((arg0: import("../scope/scope").Scope) => any), arg1: ((arg0: any, arg1: import("../scope/scope").Scope, arg2: any) => any) | undefined, arg2: boolean | undefined) => CompiledExpression;
73
+ export type ParseService = (arg0: CompiledExpression | string | ((arg0: import("../scope/scope").Scope) => any), arg1: ((arg0: any, arg1: import("../scope/scope").Scope, arg2: any) => any) | undefined, arg2: boolean | undefined) => CompiledExpression;
@@ -278,7 +278,7 @@ export class Scope {
278
278
  *
279
279
  *
280
280
  *
281
- * @param {string | ((scope: Scope) => any)} watchExp Expression that is evaluated on each
281
+ * @param {string | ((scope: Scope) => any) | import("../parser/parse").CompiledExpression} watchExp Expression that is evaluated on each
282
282
  * {@link ng.$rootScope.Scope#$digest $digest} cycle. A change in the return value triggers
283
283
  * a call to the `listener`.
284
284
  *
@@ -289,7 +289,7 @@ export class Scope {
289
289
  * comparing for reference equality.
290
290
  * @returns {function()} Returns a deregistration function for this listener.
291
291
  */
292
- $watch(watchExp: string | ((scope: Scope) => any), listener?: WatchListener, objectEquality?: boolean | undefined): () => any;
292
+ $watch(watchExp: string | ((scope: Scope) => any) | import("../parser/parse").CompiledExpression, listener?: WatchListener, objectEquality?: boolean | undefined): () => any;
293
293
  /**
294
294
  * @ngdoc method
295
295
  * @name $rootScope.Scope#$watchGroup
@@ -567,6 +567,24 @@ export class Scope {
567
567
  * @returns {*} The result of evaluating the expression.
568
568
  */
569
569
  $apply(expr?: string | ((arg0: Scope) => any)): any;
570
+ /**
571
+ * @ngdoc method
572
+ * @name $rootScope.Scope#$applyAsync
573
+ * @kind function
574
+ *
575
+ * @description
576
+ * Schedule the invocation of $apply to occur at a later time. The actual time difference
577
+ * varies across browsers, but is typically around ~10 milliseconds.
578
+ *
579
+ * This can be used to queue up multiple expressions which need to be evaluated in the same
580
+ * digest.
581
+ *
582
+ * @param {(string|function())=} expr An AngularTS expression to be executed.
583
+ *
584
+ * - `string`: execute using the rules as defined in {@link guide/expression expression}.
585
+ * - `function(scope)`: execute the function with current `scope` parameter.
586
+ */
587
+ $applyAsync(expr?: (string | (() => any)) | undefined): void;
570
588
  /**
571
589
  * @ngdoc method
572
590
  * @name $rootScope.Scope#$evalAsync
@@ -598,24 +616,6 @@ export class Scope {
598
616
  * @param {(object)=} locals Local variables object, useful for overriding values in scope.
599
617
  */
600
618
  $evalAsync(expr?: (string | ((arg0: any) => any)) | undefined, locals?: (object) | undefined): number;
601
- /**
602
- * @ngdoc method
603
- * @name $rootScope.Scope#$applyAsync
604
- * @kind function
605
- *
606
- * @description
607
- * Schedule the invocation of $apply to occur at a later time. The actual time difference
608
- * varies across browsers, but is typically around ~10 milliseconds.
609
- *
610
- * This can be used to queue up multiple expressions which need to be evaluated in the same
611
- * digest.
612
- *
613
- * @param {(string|function())=} expr An AngularTS expression to be executed.
614
- *
615
- * - `string`: execute using the rules as defined in {@link guide/expression expression}.
616
- * - `function(scope)`: execute the function with current `scope` parameter.
617
- */
618
- $applyAsync(expr?: (string | (() => any)) | undefined): void;
619
619
  /**
620
620
  * @description
621
621
  * Listens on events of a given type. See {@link ng.$rootScope.Scope#$emit $emit} for
@@ -11,17 +11,8 @@ export class FormController {
11
11
  $valid: boolean;
12
12
  $invalid: boolean;
13
13
  $submitted: boolean;
14
- $$parentForm: {
15
- $addControl: () => void;
16
- $getControls: () => any;
17
- $$renameControl: typeof nullFormRenameControl;
18
- $removeControl: () => void;
19
- $setValidity: () => void;
20
- $setDirty: () => void;
21
- $setPristine: () => void;
22
- $setSubmitted: () => void;
23
- $$setSubmitted: () => void;
24
- };
14
+ /** @type {FormController|Object} */
15
+ $$parentForm: FormController | any;
25
16
  $$element: any;
26
17
  $$animate: any;
27
18
  /**
@@ -63,8 +63,6 @@ export class StateObject {
63
63
  toString(): any;
64
64
  }
65
65
  export namespace StateObject {
66
- /** Predicate which returns true if the object is an class with @State() decorator */
67
- function isStateClass(stateDecl: any): boolean;
68
66
  /** Predicate which returns true if the object is a [[StateDeclaration]] object */
69
67
  function isStateDeclaration(obj: any): boolean;
70
68
  /** Predicate which returns true if the object is an internal [[StateObject]] object */
@@ -135,9 +135,9 @@ export class UrlMatcher {
135
135
  *
136
136
  * @param id
137
137
  * @param opts
138
- * @returns {T|Param|any|boolean|UrlMatcher|null}
138
+ * @returns {Param|any|boolean|UrlMatcher|null}
139
139
  */
140
- parameter(id: any, opts?: {}): T | Param | any | boolean | UrlMatcher | null;
140
+ parameter(id: any, opts?: {}): Param | any | boolean | UrlMatcher | null;
141
141
  /**
142
142
  * Validates the input parameter values against this UrlMatcher
143
143
  *
@@ -130,6 +130,7 @@ export class BaseUrlRule {
130
130
  match: any;
131
131
  type: string;
132
132
  $id: number;
133
- matchPriority: () => number;
133
+ _group: any;
134
134
  handler: any;
135
+ matchPriority(): number;
135
136
  }
@@ -2,19 +2,23 @@
2
2
  * JQLite both a function and an array-like data structure for manipulation of DOM, linking elements to expando cache,
3
3
  * and execution of chain functions.
4
4
  *
5
- * @param {string|Node|JQLite|ArrayLike<Element>|(() => void)|Window} element
5
+ * @param {string|Node|Node[]|NodeList|JQLite|ArrayLike<Element>|(() => void)|Window} element
6
6
  * @returns {JQLite}
7
7
  */
8
- export function JQLite(element: string | Node | JQLite | ArrayLike<Element> | (() => void) | Window): JQLite;
8
+ export function JQLite(element: string | Node | Node[] | NodeList | JQLite | ArrayLike<Element> | (() => void) | Window): JQLite;
9
9
  export class JQLite {
10
10
  /**
11
11
  * JQLite both a function and an array-like data structure for manipulation of DOM, linking elements to expando cache,
12
12
  * and execution of chain functions.
13
13
  *
14
- * @param {string|Node|JQLite|ArrayLike<Element>|(() => void)|Window} element
14
+ * @param {string|Node|Node[]|NodeList|JQLite|ArrayLike<Element>|(() => void)|Window} element
15
15
  * @returns {JQLite}
16
16
  */
17
- constructor(element: string | Node | JQLite | ArrayLike<Element> | (() => void) | Window);
17
+ constructor(element: string | Node | Node[] | NodeList | JQLite | ArrayLike<Element> | (() => void) | Window);
18
+ /**
19
+ * @returns {Element[]}
20
+ */
21
+ elements(): Element[];
18
22
  /**
19
23
  * Remove all child nodes of the set of matched elements from the DOM and clears CACHE data, associated with the node.
20
24
  * @returns {JQLite} The current instance of JQLite.
package/types/types.d.ts CHANGED
@@ -41,7 +41,7 @@ export type TranscludeFunctionObject = {
41
41
  */
42
42
  isSlotFilled: (arg0: string) => boolean;
43
43
  };
44
- export type TranscludeFunction = (arg0: TScope, arg1: CloneAttachFunction, arg2: import("./shared/jqlite/jqlite").JQLite | undefined, arg3: string | undefined) => import("./shared/jqlite/jqlite").JQLite;
44
+ export type TranscludeFunction = (arg0: TScope | Function, arg1: CloneAttachFunction | undefined, arg2: import("./shared/jqlite/jqlite").JQLite | undefined, arg3: string | undefined) => import("./shared/jqlite/jqlite").JQLite;
45
45
  export type transcludeWithScope = (arg0: TScope, arg1: CloneAttachFunction, arg2: import("./shared/jqlite/jqlite").JQLite | undefined, arg3: string | undefined) => import("./shared/jqlite/jqlite").JQLite;
46
46
  export type transcludeWithoutScope = (arg0: CloneAttachFunction | undefined, arg1: import("./shared/jqlite/jqlite").JQLite | undefined, arg2: string | undefined) => import("./shared/jqlite/jqlite").JQLite;
47
47
  /**