@angular-wave/angular.ts 0.15.2 → 0.16.0

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 (61) hide show
  1. package/@types/animations/interface.d.ts +4 -0
  2. package/@types/animations/runner/animate-runner.d.ts +2 -1
  3. package/@types/animations/shared.d.ts +100 -44
  4. package/@types/core/compile/attributes.d.ts +34 -18
  5. package/@types/core/compile/compile.d.ts +4 -5
  6. package/@types/core/controller/interface.d.ts +1 -1
  7. package/@types/core/di/di.d.ts +0 -10
  8. package/@types/core/di/interface.d.ts +28 -0
  9. package/@types/core/di/internal-injector.d.ts +28 -19
  10. package/@types/core/di/ng-module/ng-module.d.ts +35 -4
  11. package/@types/core/interpolate/interpolate.d.ts +1 -1
  12. package/@types/core/parse/ast/ast.d.ts +6 -12
  13. package/@types/core/parse/ast-type.d.ts +1 -1
  14. package/@types/core/parse/interface.d.ts +8 -40
  15. package/@types/core/parse/interpreter.d.ts +4 -3
  16. package/@types/core/parse/lexer/lexer.d.ts +2 -30
  17. package/@types/core/parse/parse.d.ts +1 -34
  18. package/@types/core/parse/parser/parser.d.ts +2 -13
  19. package/@types/core/sanitize/sanitize-uri.d.ts +2 -2
  20. package/@types/core/scope/interface.d.ts +1 -0
  21. package/@types/core/scope/scope.d.ts +10 -5
  22. package/@types/directive/form/form.d.ts +8 -40
  23. package/@types/directive/model/model.d.ts +34 -30
  24. package/@types/directive/model-options/model-options.d.ts +1 -2
  25. package/@types/directive/validators/validators.d.ts +5 -7
  26. package/@types/filters/order-by.d.ts +2 -1
  27. package/@types/interface.d.ts +3 -2
  28. package/@types/namespace.d.ts +18 -2
  29. package/@types/router/state/state-object.d.ts +2 -2
  30. package/@types/router/state/state-service.d.ts +1 -0
  31. package/@types/router/template-factory.d.ts +4 -5
  32. package/@types/router/transition/reject-factory.d.ts +32 -9
  33. package/@types/router/transition/transition-event-type.d.ts +2 -2
  34. package/@types/router/transition/transition-hook.d.ts +5 -2
  35. package/@types/router/transition/transition-service.d.ts +2 -2
  36. package/@types/router/transition/transition.d.ts +2 -2
  37. package/@types/router/view/view.d.ts +4 -4
  38. package/@types/services/http/http.d.ts +1 -1
  39. package/@types/services/pubsub/pubsub.d.ts +2 -2
  40. package/@types/services/sce/interface.d.ts +8 -0
  41. package/@types/services/sce/sce.d.ts +10 -7
  42. package/@types/services/sse/interface.d.ts +5 -20
  43. package/@types/services/storage/storage.d.ts +2 -2
  44. package/@types/services/stream/interface.d.ts +1 -0
  45. package/@types/services/stream/stream.d.ts +1 -1
  46. package/@types/services/template-request/template-request.d.ts +0 -1
  47. package/@types/services/websocket/interface.d.ts +16 -0
  48. package/@types/services/websocket/websocket.d.ts +20 -0
  49. package/@types/shared/common.d.ts +48 -27
  50. package/@types/shared/constants.d.ts +2 -8
  51. package/@types/shared/dom.d.ts +33 -19
  52. package/@types/shared/utils.d.ts +8 -8
  53. package/README.md +15 -7
  54. package/dist/angular-ts.esm.js +4257 -4325
  55. package/dist/angular-ts.umd.js +4257 -4325
  56. package/dist/angular-ts.umd.min.js +1 -1
  57. package/dist/angular-ts.umd.min.js.gz +0 -0
  58. package/dist/angular-ts.umd.min.js.map +1 -1
  59. package/package.json +1 -1
  60. package/@types/core/di/inteface.d.ts +0 -11
  61. /package/@types/core/compile/{inteface.d.ts → interface.d.ts} +0 -0
@@ -100,6 +100,10 @@ export interface AnimationOptions {
100
100
  tempClasses: string | string[];
101
101
  /** Optional DOM operation callback executed before animation */
102
102
  domOperation?: () => void;
103
+ $$domOperationFired?: boolean;
104
+ $$prepared?: boolean;
105
+ preparationClasses?: string;
106
+ activeClasses?: string;
103
107
  }
104
108
  export interface AnimateJsRunner {
105
109
  $$willAnimate: true;
@@ -36,7 +36,8 @@ export class AnimateRunner {
36
36
  * @private
37
37
  */
38
38
  private _promise;
39
- _tick: (fn: any) => void;
39
+ /** @type {(fn: VoidFunction) => void} */
40
+ _tick: (fn: VoidFunction) => void;
40
41
  /**
41
42
  * Sets or replaces the current host.
42
43
  * @param {AnimationHost} host
@@ -1,10 +1,25 @@
1
- export function assertArg(arg: any, name: any, reason: any): any;
2
- export function packageStyles(options: any): {
3
- to: any;
4
- from: any;
5
- };
6
- export function pendClasses(classes: any, fix: any, isPrefix: any): string;
7
- export function removeFromArray(arr: any, val: any): void;
1
+ /**
2
+ * @param {ng.AnimationOptions} options
3
+ */
4
+ export function packageStyles(options: ng.AnimationOptions):
5
+ | {
6
+ to: Record<string, string | number>;
7
+ from: Record<string, string | number>;
8
+ }
9
+ | {
10
+ to?: undefined;
11
+ from?: undefined;
12
+ };
13
+ /**
14
+ * @param {string | string[]} classes
15
+ * @param {string} fix
16
+ * @param {boolean | undefined} [isPrefix]
17
+ */
18
+ export function pendClasses(
19
+ classes: string | string[],
20
+ fix: string,
21
+ isPrefix?: boolean | undefined,
22
+ ): string;
8
23
  /**
9
24
  *
10
25
  * @param {NodeList|Node} element
@@ -13,17 +28,24 @@ export function removeFromArray(arr: any, val: any): void;
13
28
  export function stripCommentsFromElement(
14
29
  element: NodeList | Node,
15
30
  ): Node[] | Node | undefined;
16
- /**
17
- * @param {NodeList|Node} element
18
- * @returns {Node}
19
- */
20
- export function extractElementNode(element: NodeList | Node): Node;
21
31
  export function applyAnimationClassesFactory(): (
22
- element: any,
23
- options: any,
32
+ /** @type {HTMLElement} */ element: HTMLElement,
33
+ /** @type {ng.AnimationOptions} */ options: ng.AnimationOptions,
24
34
  ) => void;
25
- export function prepareAnimationOptions(options: any): any;
26
- export function applyAnimationStyles(element: any, options: any): void;
35
+ /**
36
+ * @param {ng.AnimationOptions | undefined} options
37
+ */
38
+ export function prepareAnimationOptions(
39
+ options: ng.AnimationOptions | undefined,
40
+ ): import("./interface.ts").AnimationOptions;
41
+ /**
42
+ * @param {HTMLElement} element
43
+ * @param {ng.AnimationOptions | undefined} options
44
+ */
45
+ export function applyAnimationStyles(
46
+ element: HTMLElement,
47
+ options: ng.AnimationOptions | undefined,
48
+ ): void;
27
49
  /**
28
50
  * Applies initial animation styles to a DOM element.
29
51
  *
@@ -31,13 +53,11 @@ export function applyAnimationStyles(element: any, options: any): void;
31
53
  * defined in `options.from`, then clears the property to prevent reuse.
32
54
  *
33
55
  * @param {HTMLElement} element - The target DOM element to apply styles to.
34
- * @param {{ from?: Partial<CSSStyleDeclaration> | null }} options - options containing a `from` object with CSS property–value pairs.
56
+ * @param {ng.AnimationOptions} [options] - options containing a `from` object with CSS property–value pairs.
35
57
  */
36
58
  export function applyAnimationFromStyles(
37
59
  element: HTMLElement,
38
- options: {
39
- from?: Partial<CSSStyleDeclaration> | null;
40
- },
60
+ options?: ng.AnimationOptions,
41
61
  ): void;
42
62
  /**
43
63
  * Applies final animation styles to a DOM element.
@@ -46,36 +66,73 @@ export function applyAnimationFromStyles(
46
66
  * defined in `options.to`, then clears the property to prevent reuse.
47
67
  *
48
68
  * @param {HTMLElement} element - The target DOM element to apply styles to.
49
- * @param {{ to?: Partial<CSSStyleDeclaration> | null }} options - options containing a `from` object with CSS property–value pairs.
69
+ * @param {ng.AnimationOptions} [options] - options containing a `from` object with CSS property–value pairs.
50
70
  */
51
71
  export function applyAnimationToStyles(
52
72
  element: HTMLElement,
53
- options: {
54
- to?: Partial<CSSStyleDeclaration> | null;
55
- },
73
+ options?: ng.AnimationOptions,
56
74
  ): void;
75
+ /**
76
+ * Merge old and new animation options for an element, computing
77
+ * the final addClass and removeClass values.
78
+ *
79
+ * @param {HTMLElement} element - The DOM element being animated.
80
+ * @param {{ options?: ng.AnimationOptions; addClass?: string; removeClass?: string }} oldAnimation
81
+ * @param {{ options?: ng.AnimationOptions; addClass?: string; removeClass?: string; preparationClasses?: string }} newAnimation
82
+ * @returns {ng.AnimationOptions} - The merged animation options.
83
+ */
57
84
  export function mergeAnimationDetails(
58
- element: any,
59
- oldAnimation: any,
60
- newAnimation: any,
61
- ): any;
62
- export function resolveElementClasses(
63
- existing: any,
64
- toAdd: any,
65
- toRemove: any,
66
- ): {
67
- addClass: string;
68
- removeClass: string;
69
- };
85
+ element: HTMLElement,
86
+ oldAnimation: {
87
+ options?: ng.AnimationOptions;
88
+ addClass?: string;
89
+ removeClass?: string;
90
+ },
91
+ newAnimation: {
92
+ options?: ng.AnimationOptions;
93
+ addClass?: string;
94
+ removeClass?: string;
95
+ preparationClasses?: string;
96
+ },
97
+ ): ng.AnimationOptions;
98
+ /**
99
+ * @param {HTMLElement} element
100
+ * @param {string | null} event
101
+ * @param {ng.AnimationOptions} options
102
+ */
70
103
  export function applyGeneratedPreparationClasses(
71
- element: any,
72
- event: any,
73
- options: any,
104
+ element: HTMLElement,
105
+ event: string | null,
106
+ options: ng.AnimationOptions,
74
107
  ): void;
75
- export function clearGeneratedClasses(element: any, options: any): void;
76
- export function blockKeyframeAnimations(node: any, applyBlock: any): string[];
77
- export function applyInlineStyle(node: any, styleTuple: any): void;
78
- export function concatWithSpace(a: any, b: any): any;
108
+ /**
109
+ * @param {HTMLElement} element
110
+ * @param {ng.AnimationOptions} options
111
+ */
112
+ export function clearGeneratedClasses(
113
+ element: HTMLElement,
114
+ options: ng.AnimationOptions,
115
+ ): void;
116
+ /**
117
+ * @param {HTMLElement} node
118
+ * @param {boolean} applyBlock
119
+ * @returns {string[]}
120
+ */
121
+ export function blockKeyframeAnimations(
122
+ node: HTMLElement,
123
+ applyBlock: boolean,
124
+ ): string[];
125
+ /**
126
+ * @param {HTMLElement} node
127
+ * @param {any[]} styleTuple
128
+ */
129
+ export function applyInlineStyle(node: HTMLElement, styleTuple: any[]): void;
130
+ /**
131
+ * @param {string} a
132
+ * @param {string} b
133
+ * @returns {string}
134
+ */
135
+ export function concatWithSpace(a: string, b: string): string;
79
136
  export const ADD_CLASS_SUFFIX: "-add";
80
137
  export const REMOVE_CLASS_SUFFIX: "-remove";
81
138
  export const EVENT_CLASS_PREFIX: "ng-";
@@ -83,4 +140,3 @@ export const ACTIVE_CLASS_SUFFIX: "-active";
83
140
  export const PREPARE_CLASS_SUFFIX: "-prepare";
84
141
  export const NG_ANIMATE_CLASSNAME: "ng-animate";
85
142
  export const NG_ANIMATE_CHILDREN_DATA: "$$ngAnimateChildren";
86
- export const ngMinErr: (arg0: string, ...arg1: any[]) => Error;
@@ -1,6 +1,3 @@
1
- /**
2
- * @extends {Record<string, any>}
3
- */
4
1
  export class Attributes {
5
2
  static $nonscope: boolean;
6
3
  /**
@@ -16,35 +13,39 @@ export class Attributes {
16
13
  * - Used when cloning attributes for directive linking / child scopes.
17
14
  * - Performs a shallow copy of all properties from the source Attributes object,
18
15
  * including `$attr`, normalized attribute values, and internal fields
19
- * (e.g. `$$observers`).
16
+ * (e.g. `_observers`).
20
17
  * - `$attr` is intentionally **not reinitialized** in this case, because the
21
18
  * source object already contains the correct normalized → DOM attribute mapping.
22
19
  *
23
20
  * @param {ng.AnimateService} $animate
24
21
  * @param {ng.ExceptionHandlerService} $exceptionHandler
25
- * @param {*} $sce
22
+ * @param {ng.SCEService} $sce
26
23
  * @param {import("../../shared/noderef.js").NodeRef} [nodeRef]
27
- * @param {Object} [attributesToCopy]
24
+ * @param {Object & Record<string, any>} [attributesToCopy]
28
25
  */
29
26
  constructor(
30
27
  $animate: ng.AnimateService,
31
28
  $exceptionHandler: ng.ExceptionHandlerService,
32
- $sce: any,
29
+ $sce: ng.SCEService,
33
30
  nodeRef?: import("../../shared/noderef.js").NodeRef,
34
- attributesToCopy?: any,
31
+ attributesToCopy?: any & Record<string, any>,
35
32
  );
36
- _$animate: import("../../animations/interface.ts").AnimateService;
37
- _$exceptionHandler: import("../../services/exception/interface.ts").ExceptionHandler;
38
- _$sce: any;
33
+ /** @type {ng.AnimateService} */
34
+ _animate: ng.AnimateService;
35
+ /** @type {ng.ExceptionHandlerService} */
36
+ _exceptionHandler: ng.ExceptionHandlerService;
37
+ /** @type {ng.SCEService} */
38
+ _sce: ng.SCEService;
39
39
  /**
40
40
  * A map of DOM element attribute names to the normalized name. This is needed
41
41
  * to do reverse lookup from normalized name back to actual name.
42
+ * @type {Record<string, string>}
42
43
  */
43
- $attr: {};
44
- /** @type {import("../../shared/noderef.js").NodeRef} */
45
- _nodeRef: import("../../shared/noderef.js").NodeRef;
46
- /** @type {Node|Element} */
47
- get $$element(): Node | Element;
44
+ $attr: Record<string, string>;
45
+ /** @type {import("../../shared/noderef.js").NodeRef | undefined} */
46
+ _nodeRef: import("../../shared/noderef.js").NodeRef | undefined;
47
+ /** @ignore @returns {Node|Element} */
48
+ _element(): Node | Element;
48
49
  /**
49
50
  * Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with `x-` or
50
51
  * `data-`) to its normalized, camelCase form.
@@ -109,8 +110,23 @@ export class Attributes {
109
110
  * @returns {Function} Returns a deregistration function for this observer.
110
111
  */
111
112
  $observe<T>(key: string, fn: (value?: T) => any): Function;
112
- $$observers: any;
113
- setSpecialAttr(element: any, attrName: any, value: any): void;
113
+ _observers: any;
114
+ /**
115
+ * Sets a special (non-standard) attribute on an element.
116
+ *
117
+ * Used for attribute names that cannot be set via `setAttribute`
118
+ * (e.g. names not starting with a letter like `(click)`).
119
+ *
120
+ * @param {Element} element
121
+ * @param {string} attrName
122
+ * @param {string | null} value
123
+ * @returns {void}
124
+ */
125
+ setSpecialAttr(
126
+ element: Element,
127
+ attrName: string,
128
+ value: string | null,
129
+ ): void;
114
130
  /**
115
131
  *
116
132
  * @param {unknown} value
@@ -113,7 +113,7 @@ export class CompileProvider {
113
113
  *
114
114
  * @param {string} elementName The element name or '*' to match any element.
115
115
  * @param {string} propertyName The DOM property name.
116
- * @param {string} ctx The {@link _$sce} security context in which this value is safe for use, e.g. `$sce.URL`
116
+ * @param {string} ctx The {@link _sce} security context in which this value is safe for use, e.g. `$sce.URL`
117
117
  * @returns {object} `this` for chaining
118
118
  */
119
119
  addPropertySecurityContext: (
@@ -130,15 +130,14 @@ export class CompileProvider {
130
130
  $templateRequest: ng.TemplateRequestService,
131
131
  $parse: ng.ParseService,
132
132
  $controller: any,
133
- $rootScope: ng.Scope,
134
- $sce: any,
133
+ $sce: ng.SCEService,
135
134
  $animate: ng.AnimateService,
136
135
  ) => (
137
136
  compileNode: string | Element | Node | ChildNode | NodeList,
138
- transcludeFn?: import("./inteface.ts").TranscludeFn,
137
+ transcludeFn?: import("./interface.ts").TranscludeFn,
139
138
  maxPriority?: number,
140
139
  ignoreDirective?: string,
141
140
  previousCompileContext?: any,
142
- ) => import("./inteface.ts").PublicLinkFn)
141
+ ) => import("./interface.ts").PublicLinkFn)
143
142
  )[];
144
143
  }
@@ -1,5 +1,5 @@
1
1
  export type ControllerService = (
2
- expression: string | Function | any[],
2
+ expression: string | Function | ng.AnnotatedFactory<any>,
3
3
  locals?: Record<string, any>,
4
4
  later?: boolean,
5
5
  ident?: string,
@@ -1,13 +1,3 @@
1
- /**
2
- * @param {Function} fn
3
- * @returns {string}
4
- */
5
- export function stringifyFn(fn: Function): string;
6
- /**
7
- * @param {Function} fn
8
- * @returns {Array<any>}
9
- */
10
- export function extractArgs(fn: Function): Array<any>;
11
1
  /**
12
2
  * @param {Function} func
13
3
  * @returns {boolean}
@@ -0,0 +1,28 @@
1
+ import { InjectorService, ProviderInjector } from "./internal-injector.js";
2
+ export interface StorageLike {
3
+ getItem(key: string): string | null;
4
+ setItem(key: string, value: string): void;
5
+ removeItem(key: string): void;
6
+ }
7
+ export interface PersistentStoreConfig {
8
+ backend?: StorageLike;
9
+ serialize?: (value: unknown) => string;
10
+ deserialize?: (value: string) => unknown;
11
+ cookie?: Record<string, unknown>;
12
+ }
13
+ export interface ProviderCache {
14
+ [key: string]: any;
15
+ $provide: {
16
+ provider: Function;
17
+ factory: Function;
18
+ service: Function;
19
+ value: Function;
20
+ constant: Function;
21
+ store: Function;
22
+ decorator: Function;
23
+ };
24
+ $injectorProvider?: {
25
+ $get: () => InjectorService;
26
+ };
27
+ $injector?: ProviderInjector;
28
+ }
@@ -3,10 +3,11 @@
3
3
  */
4
4
  export class ProviderInjector extends AbstractInjector {
5
5
  /**
6
- * @param {Object} cache
6
+ * @param {import('./interface.ts').ProviderCache} cache
7
7
  * @param {boolean} strictDi - Indicates if strict dependency injection is enforced.
8
8
  */
9
- constructor(cache: any, strictDi: boolean);
9
+ constructor(cache: import("./interface.ts").ProviderCache, strictDi: boolean);
10
+ _cache: import("./interface.ts").ProviderCache;
10
11
  /**
11
12
  * Factory method for creating services.
12
13
  * @param {string} caller - The name of the caller requesting the service.
@@ -23,8 +24,12 @@ export class InjectorService extends AbstractInjector {
23
24
  * @param {boolean} strictDi - Indicates if strict dependency injection is enforced.
24
25
  */
25
26
  constructor(providerInjector: ProviderInjector, strictDi: boolean);
26
- /** @type {ProviderInjector} */
27
- providerInjector: ProviderInjector;
27
+ /** @type {(mods: Array<Function | string | ng.AnnotatedFactory<any>>) => void} */
28
+ loadNewModules: (
29
+ mods: Array<Function | string | ng.AnnotatedFactory<any>>,
30
+ ) => void;
31
+ /** @private @type {ProviderInjector} */
32
+ private _providerInjector;
28
33
  /**
29
34
  *
30
35
  * @param {string} name
@@ -40,13 +45,13 @@ declare class AbstractInjector {
40
45
  /**
41
46
  * @type {Object<String, Function>}
42
47
  */
43
- cache: any;
48
+ _cache: any;
44
49
  /** @type {boolean} */
45
50
  strictDi: boolean;
46
51
  /** @type {string[]} */
47
- path: string[];
52
+ _path: string[];
48
53
  /** @type {Object.<string, ng.NgModule>} */
49
- modules: {
54
+ _modules: {
50
55
  [x: string]: import("./ng-module/ng-module.js").NgModule;
51
56
  };
52
57
  /**
@@ -59,38 +64,42 @@ declare class AbstractInjector {
59
64
  /**
60
65
  * Get the injection arguments for a function.
61
66
  *
62
- * @param {Function|Array} fn
63
- * @param {Object} locals
64
- * @param {string} serviceName
67
+ * @param {Function|ng.AnnotatedFactory<any>} fn
68
+ * @param {Object & Record<string, any>} [locals]
69
+ * @param {string} [serviceName]
65
70
  * @returns
66
71
  */
67
- injectionArgs(fn: Function | any[], locals: any, serviceName: string): any[];
72
+ _injectionArgs(
73
+ fn: Function | ng.AnnotatedFactory<any>,
74
+ locals?: any & Record<string, any>,
75
+ serviceName?: string,
76
+ ): any[];
68
77
  /**
69
78
  * Invoke a function with optional context and locals.
70
79
  *
71
- * @param {Function|String|Array<any>} fn
80
+ * @param {Function|String|ng.AnnotatedFactory<any>} fn
72
81
  * @param {*} [self]
73
82
  * @param {Object} [locals]
74
83
  * @param {string} [serviceName]
75
84
  * @returns {*}
76
85
  */
77
86
  invoke(
78
- fn: Function | string | Array<any>,
87
+ fn: Function | string | ng.AnnotatedFactory<any>,
79
88
  self?: any,
80
89
  locals?: any,
81
90
  serviceName?: string,
82
91
  ): any;
83
92
  /**
84
93
  * Instantiate a type constructor with optional locals.
85
- * @param {Function|Array} type
94
+ * @param {Function|ng.AnnotatedFactory<any>} type
86
95
  * @param {*} [locals]
87
96
  * @param {string} [serviceName]
88
97
  */
89
- instantiate(type: Function | any[], locals?: any, serviceName?: string): any;
90
- /**
91
- * @abstract
92
- */
93
- loadNewModules(): void;
98
+ instantiate(
99
+ type: Function | ng.AnnotatedFactory<any>,
100
+ locals?: any,
101
+ serviceName?: string,
102
+ ): any;
94
103
  /**
95
104
  * @abstract
96
105
  * @param {string} _serviceName
@@ -23,20 +23,27 @@ export class NgModule {
23
23
  public name: string;
24
24
  /**
25
25
  * Array of module names that this module depends on.
26
+ * @ignore
26
27
  * @type {string[]}
27
28
  */
28
29
  _requires: string[];
29
30
  /**
30
31
  * Holds a collection of tasks, required to instantiate an angular component
32
+ * @ignore
31
33
  * @type {!Array<Array<*>>}
32
34
  */
33
35
  _invokeQueue: Array<Array<any>>;
34
- /** @type {!Array<Array<*>>} */
36
+ /**
37
+ * @ignore
38
+ * @type {!Array<Array<*>>}
39
+ */
35
40
  _configBlocks: Array<Array<any>>;
36
- /** @type {!Array.<ng.Injectable<any>>} */
41
+ /** @ignore @type {!Array.<ng.Injectable<any>>} */
37
42
  _runBlocks: Array<ng.Injectable<any>>;
38
- _services: any[];
39
- _restDefinitions: any[];
43
+ /** @ignore @type {!Array.<ng.Injectable<any>>} */
44
+ _services: Array<ng.Injectable<any>>;
45
+ /** @ignore @type {!Array.<ng.RestDefinition<any>>} */
46
+ _restDefinitions: Array<ng.RestDefinition<any>>;
40
47
  /**
41
48
  * @param {string} name
42
49
  * @param {any} object - Allows undefined
@@ -192,4 +199,28 @@ export class NgModule {
192
199
  entityClass: ng.EntityClass<T>,
193
200
  options?: any | undefined,
194
201
  ): NgModule;
202
+ /**
203
+ * Register a pre-configured SSE connection during module configuration.
204
+ *
205
+ * @param {string} name - Injectable name
206
+ * @param {string} url - SSE endpoint
207
+ * @param {ng.SseConfig} [options] - Optional SSE config
208
+ * @returns {NgModule}
209
+ */
210
+ sse(name: string, url: string, options?: ng.SseConfig): NgModule;
211
+ /**
212
+ * Register a pre-configured WebSocket connection during module configuration.
213
+ *
214
+ * @param {string} name - Injectable name
215
+ * @param {string} url - WebSocket endpoint
216
+ * @param {string[]} [protocols] - Optional subprotocols
217
+ * @param {ng.WebSocketConfig} [options] - Optional WebSocket configuration
218
+ * @returns {NgModule}
219
+ */
220
+ websocket(
221
+ name: string,
222
+ url: string,
223
+ protocols?: string[],
224
+ options?: ng.WebSocketConfig,
225
+ ): NgModule;
195
226
  }
@@ -21,6 +21,6 @@ export class InterpolateProvider {
21
21
  endSymbol: string;
22
22
  $get: (
23
23
  | string
24
- | (($parse: ng.ParseService, $sce: any) => ng.InterpolateService)
24
+ | (($parse: ng.ParseService, $sce: ng.SCEService) => ng.InterpolateService)
25
25
  )[];
26
26
  }
@@ -8,14 +8,8 @@ export class AST {
8
8
  constructor(lexer: import("../lexer/lexer.js").Lexer);
9
9
  /** @type {import('../lexer/lexer.js').Lexer} */
10
10
  _lexer: import("../lexer/lexer.js").Lexer;
11
- _selfReferential: {
12
- this: {
13
- type: number;
14
- };
15
- $locals: {
16
- type: number;
17
- };
18
- };
11
+ /** @type {Record<string, any>} */
12
+ _selfReferential: Record<string, any>;
19
13
  _index: number;
20
14
  /**
21
15
  * Parses the input text and generates an AST.
@@ -124,9 +118,9 @@ export class AST {
124
118
  /**
125
119
  * Throws a syntax error.
126
120
  * @param {string} msg - The error message.
127
- * @param {import("../lexer/lexer.js").Token} [token] - The token that caused the error.
121
+ * @param {import("../lexer/lexer.js").Token} token - The token that caused the error.
128
122
  */
129
- _throwError(msg: string, token?: import("../lexer/lexer.js").Token): void;
123
+ _throwError(msg: string, token: import("../lexer/lexer.js").Token): void;
130
124
  /**
131
125
  * Consumes a token if it matches the expected type.
132
126
  * @param {string} [e1] - The expected token type.
@@ -140,13 +134,13 @@ export class AST {
140
134
  _peekToken(): import("../lexer/lexer.js").Token;
141
135
  /**
142
136
  * Checks if the next token matches any of the expected types.
143
- * @param {...string} [expected] - The expected token types.
137
+ * @param {...string} expected - The expected token types.
144
138
  * @returns {import('../lexer/lexer.js').Token|boolean} The next token if it matches, otherwise false.
145
139
  */
146
140
  _peek(...expected: string[]): import("../lexer/lexer.js").Token | boolean;
147
141
  /**
148
142
  * Consumes the next token if it matches any of the expected types.
149
- * @param {...string} [expected] - The expected token types.
143
+ * @param {...string} expected - The expected token types.
150
144
  * @returns {import("../lexer/lexer.js").Token|boolean} The consumed token if it matches, otherwise false.
151
145
  */
152
146
  _expect(...expected: string[]): import("../lexer/lexer.js").Token | boolean;
@@ -16,5 +16,5 @@ export namespace ASTType {
16
16
  let _ObjectExpression: number;
17
17
  let _ThisExpression: number;
18
18
  let _LocalsExpression: number;
19
- let NGValueParameter: number;
19
+ let _NGValueParameter: number;
20
20
  }
@@ -5,36 +5,21 @@ import type { Scope } from "../scope/scope.js";
5
5
  */
6
6
  export interface CompiledExpressionProps {
7
7
  /** Indicates if the expression is a literal. */
8
- literal: boolean;
8
+ _literal: boolean;
9
9
  /** Indicates if the expression is constant. */
10
10
  constant: boolean;
11
11
  /** Optional flag for pure expressions. */
12
- isPure?: boolean;
13
- /** Indicates if the expression should be evaluated only once. */
14
- oneTime: boolean;
12
+ _isPure?: boolean;
15
13
  /** AST node decorated with metadata. */
16
- decoratedNode: DecoratedASTNode;
17
- /**
18
- * Optional custom watch delegate function for the expression.
19
- * @param scope - The current scope.
20
- * @param listener - A listener function.
21
- * @param equalityCheck - Whether to use deep equality.
22
- * @param expression - The compiled expression or string.
23
- */
24
- $$watchDelegate?: (
25
- scope: Scope,
26
- listener: Function,
27
- equalityCheck: boolean,
28
- expression: CompiledExpression | string | ((scope: Scope) => any),
29
- ) => any;
14
+ _decoratedNode: DecoratedASTNode;
30
15
  /** Expression inputs; may be an array or a function. */
31
- inputs: any[] | Function;
16
+ _inputs?: any[] | Function;
32
17
  /**
33
18
  * Optional assign function for two-way binding.
34
19
  * Assigns a value to a context.
35
20
  * If value is not provided, may return the getter.
36
21
  */
37
- assign?: (context: any, value: any) => any;
22
+ _assign?: (context: any, value: any) => any;
38
23
  }
39
24
  /**
40
25
  * Expression function with context and optional locals/assign.
@@ -50,30 +35,13 @@ export type CompiledExpressionFunction = (
50
35
  */
51
36
  export type CompiledExpression = CompiledExpressionFunction &
52
37
  CompiledExpressionProps;
53
- /**
54
- * Map used for expressions that watch specific object keys.
55
- */
56
- export interface CompiledExpressionHandlerMap {
57
- /** Indicates if the expression is a literal. */
58
- literal: boolean;
59
- /** Indicates if the expression is constant. */
60
- constant: boolean;
61
- /** Optional flag for pure expressions. */
62
- isPure?: boolean;
63
- /** Indicates if the expression should be evaluated only once. */
64
- oneTime: boolean;
65
- /** A map of property keys to observe. */
66
- keyMap: Map<string, Function>;
67
- }
68
38
  /**
69
39
  * Parses a string or expression function into a compiled expression.
70
- * @param expression - The input expression (string or function).
40
+ * @param expression - The input expression to evaluate.
71
41
  * @param interceptorFn - Optional value transformer.
72
- * @param expensiveChecks - Whether to enable expensive change detection.
73
42
  * @returns A compiled expression.
74
43
  */
75
44
  export type ParseService = (
76
- expression?: CompiledExpression | string | ((scope: Scope) => any),
77
- interceptorFn?: (value: any, scope: Scope, locals: any) => any,
78
- expensiveChecks?: boolean,
45
+ expression: string,
46
+ interceptorFn?: (value: any) => any,
79
47
  ) => CompiledExpression;