@angular-wave/angular.ts 0.9.2 → 0.9.4

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 (196) hide show
  1. package/@types/angular.d.ts +4 -19
  2. package/@types/animations/animate.d.ts +2 -2
  3. package/@types/animations/animation.d.ts +1 -1
  4. package/@types/core/compile/attributes.d.ts +1 -1
  5. package/@types/core/compile/compile.d.ts +2 -2
  6. package/@types/core/controller/controller.d.ts +1 -1
  7. package/@types/core/controller/interface.d.ts +6 -0
  8. package/@types/core/di/ng-module.d.ts +27 -26
  9. package/@types/core/filter/filter.d.ts +5 -5
  10. package/@types/core/interpolate/interface.d.ts +13 -0
  11. package/@types/core/interpolate/interpolate.d.ts +1 -13
  12. package/@types/core/scope/scope.d.ts +4 -1
  13. package/@types/directive/http/http.d.ts +16 -16
  14. package/@types/directive/http/interface.d.ts +27 -0
  15. package/@types/directive/include/include.d.ts +4 -4
  16. package/@types/directive/inject/inject.d.ts +12 -0
  17. package/@types/directive/model/model.d.ts +1 -1
  18. package/@types/directive/script/script.d.ts +2 -2
  19. package/@types/directive/setter/setter.d.ts +4 -4
  20. package/@types/filters/filter.d.ts +2 -2
  21. package/@types/filters/filters.d.ts +2 -2
  22. package/@types/filters/interface.d.ts +8 -0
  23. package/@types/filters/limit-to.d.ts +2 -2
  24. package/@types/filters/order-by.d.ts +2 -2
  25. package/@types/index.d.ts +84 -1
  26. package/@types/interface.d.ts +105 -82
  27. package/@types/router/state/interface.d.ts +8 -8
  28. package/@types/router/state-filters.d.ts +4 -4
  29. package/@types/router/template-factory.d.ts +6 -6
  30. package/@types/router/transition/hook-builder.d.ts +5 -2
  31. package/@types/router/transition/hook-registry.d.ts +11 -2
  32. package/@types/router/transition/transition-service.d.ts +6 -2
  33. package/@types/router/transition/transition.d.ts +2 -2
  34. package/@types/router/view/view.d.ts +1 -8
  35. package/@types/router/view-scroll.d.ts +4 -2
  36. package/@types/services/{anchor-scroll.d.ts → anchor-scroll/anchor-scroll.d.ts} +2 -2
  37. package/@types/services/exception/exception-handler.d.ts +2 -2
  38. package/@types/services/exception/interface.d.ts +1 -1
  39. package/@types/services/http/http.d.ts +40 -2
  40. package/@types/services/http/interface.d.ts +11 -0
  41. package/@types/services/location/location.d.ts +1 -4
  42. package/@types/services/sce/sce.d.ts +3 -4
  43. package/@types/services/template-cache/template-cache.d.ts +4 -4
  44. package/@types/services/template-request/interface.d.ts +22 -0
  45. package/@types/services/{template-request.d.ts → template-request/template-request.d.ts} +4 -7
  46. package/@types/shared/common.d.ts +8 -69
  47. package/@types/shared/hof.d.ts +7 -7
  48. package/dist/angular-ts.esm.js +509 -570
  49. package/dist/angular-ts.umd.js +509 -570
  50. package/dist/angular-ts.umd.min.js +1 -1
  51. package/{src/filters → docs/content/docs/filter}/filter.md +18 -9
  52. package/{src/filters → docs/content/docs/filter}/json.md +6 -3
  53. package/docs/content/docs/filter/limit-to.md +30 -0
  54. package/docs/content/docs/filter/order-by.md +123 -0
  55. package/docs/content/docs/provider/sceProvider.md +194 -0
  56. package/docs/content/docs/provider/templateRequestProvider.md +5 -0
  57. package/docs/content/docs/service/compile.md +5 -0
  58. package/docs/content/docs/service/controller.md +5 -0
  59. package/docs/content/docs/service/http.md +161 -0
  60. package/docs/content/docs/service/interpolation.md +5 -0
  61. package/docs/content/docs/service/log.md +1 -1
  62. package/docs/content/docs/service/parse.md +5 -0
  63. package/docs/content/docs/service/rootElement.md +5 -0
  64. package/docs/content/docs/service/rootScope.md +5 -0
  65. package/docs/content/docs/service/sce.md +194 -0
  66. package/docs/content/docs/service/templateRequest.md +5 -0
  67. package/docs/content/docs/values/_index.md +4 -0
  68. package/docs/content/docs/values/document.md +29 -0
  69. package/docs/content/docs/values/window.md +29 -0
  70. package/docs/layouts/shortcodes/version.html +1 -1
  71. package/docs/static/examples/document/document.html +3 -0
  72. package/docs/static/examples/i18n/i18n.html +77 -0
  73. package/docs/static/examples/window/window.html +4 -0
  74. package/docs/static/typedoc/assets/hierarchy.js +1 -1
  75. package/docs/static/typedoc/assets/highlight.css +0 -49
  76. package/docs/static/typedoc/assets/navigation.js +1 -1
  77. package/docs/static/typedoc/assets/search.js +1 -1
  78. package/docs/static/typedoc/classes/PubSubProvider.html +3 -2
  79. package/docs/static/typedoc/classes/TemplateCacheProvider.html +1 -1
  80. package/docs/static/typedoc/hierarchy.html +1 -1
  81. package/docs/static/typedoc/index.html +1 -1
  82. package/docs/static/typedoc/interfaces/HttpProviderDefaults.html +1 -1
  83. package/docs/static/typedoc/interfaces/RequestConfig.html +1 -1
  84. package/docs/static/typedoc/interfaces/RequestShortcutConfig.html +1 -1
  85. package/docs/static/typedoc/interfaces/ServiceProvider.html +3 -3
  86. package/docs/static/typedoc/types/HttpParamSerializer.html +2 -0
  87. package/docs/static/typedoc/types/{Expression.html → HttpParams.html} +1 -5
  88. package/legacy.d.ts +0 -921
  89. package/package.json +1 -1
  90. package/src/angular.js +2 -9
  91. package/src/animations/animate.js +1 -1
  92. package/src/animations/animation.js +7 -7
  93. package/src/core/compile/compile.js +3 -2
  94. package/src/core/controller/controller.js +10 -6
  95. package/src/core/controller/interface.ts +6 -0
  96. package/src/core/di/injector.js +1 -1
  97. package/src/core/di/internal-injector.js +2 -0
  98. package/src/core/di/ng-module.js +16 -13
  99. package/src/core/filter/filter.js +3 -3
  100. package/src/core/interpolate/interface.ts +14 -0
  101. package/src/core/interpolate/interpolate.js +7 -5
  102. package/src/core/scope/scope.js +4 -1
  103. package/src/directive/http/delete.spec.js +5 -8
  104. package/src/directive/http/http.js +16 -16
  105. package/src/directive/http/interface.ts +36 -0
  106. package/src/directive/http/put.spec.js +5 -8
  107. package/src/directive/include/include.js +2 -2
  108. package/src/{services/http-backend/http-backend.html → directive/inject/inject.html} +1 -4
  109. package/src/directive/inject/inject.js +35 -0
  110. package/src/directive/inject/inject.spec.js +108 -0
  111. package/src/{services/http-backend/http-backend.test.js → directive/inject/inject.test.js} +1 -1
  112. package/src/directive/script/script.js +1 -1
  113. package/src/directive/setter/setter.js +2 -2
  114. package/src/filters/filter.js +1 -1
  115. package/src/filters/filters.js +1 -1
  116. package/src/filters/interface.ts +9 -0
  117. package/src/filters/limit-to.js +1 -1
  118. package/src/filters/order-by.js +1 -1
  119. package/src/index.ts +96 -0
  120. package/src/injection-tokens.js +4 -1
  121. package/src/interface.ts +102 -93
  122. package/src/ng.js +6 -4
  123. package/src/ng.spec.js +12 -0
  124. package/src/router/directives/state-directives.js +1 -1
  125. package/src/router/directives/view-directive.spec.js +19 -35
  126. package/src/router/state/interface.ts +8 -8
  127. package/src/router/state/state-builder.js +4 -4
  128. package/src/router/state/state-registry.js +7 -2
  129. package/src/router/state/state-service.js +2 -14
  130. package/src/router/state-filters.js +2 -2
  131. package/src/router/template-factory.js +3 -3
  132. package/src/router/template-factory.spec.js +10 -19
  133. package/src/router/transition/hook-builder.js +5 -1
  134. package/src/router/transition/hook-registry.js +12 -3
  135. package/src/router/transition/transition-service.js +4 -9
  136. package/src/router/transition/transition.js +3 -2
  137. package/src/router/url/url-service.js +2 -2
  138. package/src/router/view/view.js +3 -15
  139. package/src/router/view-scroll.js +2 -2
  140. package/src/services/{anchor-scroll.js → anchor-scroll/anchor-scroll.js} +4 -4
  141. package/src/services/exception/exception-handler.js +1 -1
  142. package/src/services/exception/interface.ts +1 -1
  143. package/src/services/http/http.js +200 -13
  144. package/src/services/http/http.spec.js +388 -9
  145. package/src/services/http/interface.ts +13 -0
  146. package/src/services/location/location.js +1 -1
  147. package/src/services/pubsub/pubsub.js +0 -1
  148. package/src/services/sce/sce.js +18 -13
  149. package/src/services/template-cache/template-cache.js +2 -2
  150. package/src/services/template-request/interface.ts +23 -0
  151. package/src/services/{template-request.js → template-request/template-request.js} +6 -6
  152. package/src/shared/common.js +7 -80
  153. package/src/shared/hof.js +23 -17
  154. package/typedoc.json +1 -1
  155. package/@types/services/cookie-reader.d.ts +0 -4
  156. package/@types/services/http-backend/http-backend.d.ts +0 -58
  157. package/@types/services/template-cache/interface.d.ts +0 -10
  158. package/docs/static/typedoc/interfaces/ChangesObject.html +0 -6
  159. package/docs/static/typedoc/interfaces/ComponentOptions.html +0 -16
  160. package/docs/static/typedoc/interfaces/Controller.html +0 -12
  161. package/docs/static/typedoc/interfaces/Directive.html +0 -37
  162. package/docs/static/typedoc/interfaces/DirectivePrePost.html +0 -4
  163. package/docs/static/typedoc/interfaces/NgModelController.html +0 -30
  164. package/docs/static/typedoc/interfaces/NgModelOptions.html +0 -16
  165. package/docs/static/typedoc/interfaces/Provider.html +0 -34
  166. package/docs/static/typedoc/interfaces/TemplateCache.html +0 -7
  167. package/docs/static/typedoc/interfaces/TranscludeFunctionObject.html +0 -8
  168. package/docs/static/typedoc/types/AnnotatedDirectiveFactory.html +0 -1
  169. package/docs/static/typedoc/types/AnnotatedFactory.html +0 -8
  170. package/docs/static/typedoc/types/CloneAttachFunction.html +0 -2
  171. package/docs/static/typedoc/types/ControllerConstructor.html +0 -2
  172. package/docs/static/typedoc/types/DirectiveCompileFn.html +0 -2
  173. package/docs/static/typedoc/types/DirectiveController.html +0 -2
  174. package/docs/static/typedoc/types/DirectiveFactory.html +0 -1
  175. package/docs/static/typedoc/types/DirectiveFactoryFn.html +0 -1
  176. package/docs/static/typedoc/types/DirectiveLinkFn.html +0 -2
  177. package/docs/static/typedoc/types/ExpandoStore.html +0 -2
  178. package/docs/static/typedoc/types/FilterFactory.html +0 -2
  179. package/docs/static/typedoc/types/FilterFn.html +0 -2
  180. package/docs/static/typedoc/types/Injectable.html +0 -4
  181. package/docs/static/typedoc/types/InjectableClass.html +0 -1
  182. package/docs/static/typedoc/types/InjectableFactory.html +0 -1
  183. package/docs/static/typedoc/types/OnChangesObject.html +0 -2
  184. package/docs/static/typedoc/types/SwapModeType.html +0 -2
  185. package/docs/static/typedoc/types/TController.html +0 -2
  186. package/docs/static/typedoc/variables/SwapMode.html +0 -11
  187. package/src/filters/limit-to.md +0 -19
  188. package/src/filters/order-by.md +0 -83
  189. package/src/router/state/README.md +0 -21
  190. package/src/services/cookie-reader.js +0 -48
  191. package/src/services/http/http.md +0 -413
  192. package/src/services/http-backend/http-backend.js +0 -158
  193. package/src/services/http-backend/http-backend.spec.js +0 -389
  194. package/src/services/sce/sce.md +0 -300
  195. package/src/services/template-cache/interface.ts +0 -10
  196. /package/src/services/{anchor-scroll.html → anchor-scroll/anchor-scroll.html} +0 -0
@@ -1,9 +1,3 @@
1
- /**
2
- * Configuration option for AngularTS bootstrap process.
3
- *
4
- * @typedef {Object} AngularBootstrapConfig
5
- * @property {boolean} [strictDi] - Disable automatic function annotation for the application. This is meant to assist in finding bugs which break minified code. Defaults to `false`.
6
- */
7
1
  export class Angular {
8
2
  $cache: Map<number, import("./interface.ts").ExpandoStore>;
9
3
  /** @type {import('./services/pubsub/pubsub.js').PubSub} */
@@ -59,13 +53,13 @@ export class Angular {
59
53
  * Each item in the array should be the name of a predefined module or a (DI annotated)
60
54
  * function that will be invoked by the injector as a `config` block.
61
55
  * See: {@link angular.module modules}
62
- * @param {AngularBootstrapConfig} [config]
56
+ * @param {import("./interface.ts").AngularBootstrapConfig} [config]
63
57
  * @returns {import('./core/di/internal-injector.js').InjectorService} The created injector instance for this application.
64
58
  */
65
59
  bootstrap(
66
60
  element: string | Element | Document,
67
61
  modules?: Array<string | any>,
68
- config?: AngularBootstrapConfig,
62
+ config?: import("./interface.ts").AngularBootstrapConfig,
69
63
  ): import("./core/di/internal-injector.js").InjectorService;
70
64
  $injector: import("./core/di/internal-injector.js").InjectorService;
71
65
  /**
@@ -124,25 +118,16 @@ export class Angular {
124
118
  * @param {string} name The name of the module to create or retrieve.
125
119
  * @param {Array.<string>} [requires] If specified then new module is being created. If
126
120
  * unspecified then the module is being retrieved for further configuration.
127
- * @param {import("./interface.js").Injectable} [configFn] Optional configuration function for the module that gets
121
+ * @param {import("./interface.js").Injectable<any>} [configFn] Optional configuration function for the module that gets
128
122
  * passed to {@link NgModule.config NgModule.config()}.
129
123
  * @returns {NgModule} A newly registered module.
130
124
  */
131
125
  module(
132
126
  name: string,
133
127
  requires?: Array<string>,
134
- configFn?: import("./interface.js").Injectable,
128
+ configFn?: import("./interface.js").Injectable<any>,
135
129
  ): NgModule;
136
130
  }
137
- /**
138
- * Configuration option for AngularTS bootstrap process.
139
- */
140
- export type AngularBootstrapConfig = {
141
- /**
142
- * - Disable automatic function annotation for the application. This is meant to assist in finding bugs which break minified code. Defaults to `false`.
143
- */
144
- strictDi?: boolean;
145
- };
146
131
  import { getController } from "./shared/dom.js";
147
132
  import { getInjector } from "./shared/dom.js";
148
133
  import { getScope } from "./shared/dom.js";
@@ -38,12 +38,12 @@ export class AnimateProvider {
38
38
  * ```
39
39
  *
40
40
  * @param {string} name The name of the animation (this is what the class-based CSS value will be compared to).
41
- * @param {import("../interface.ts").Injectable} factory The factory function that will be executed to return the animation
41
+ * @param {import("../interface.ts").Injectable<any>} factory The factory function that will be executed to return the animation
42
42
  * object.
43
43
  */
44
44
  register: (
45
45
  name: string,
46
- factory: import("../interface.ts").Injectable,
46
+ factory: import("../interface.ts").Injectable<any>,
47
47
  ) => void;
48
48
  /**
49
49
  * Sets and/or returns the custom filter function that is used to "filter" animations, i.e.
@@ -4,7 +4,7 @@ export class AnimationProvider {
4
4
  $get: (
5
5
  | string
6
6
  | ((
7
- $rootScope: any,
7
+ $rootScope: ng.RootScopeService,
8
8
  $injector: any,
9
9
  $$AnimateRunner: any,
10
10
  $$rAFScheduler: any,
@@ -21,7 +21,7 @@ export class Attributes implements Record<string, any> {
21
21
  );
22
22
  $rootScope: import("../scope/scope.js").Scope;
23
23
  $animate: any;
24
- $exceptionHandler: import("../../services/exception/interface.ts").Interface;
24
+ $exceptionHandler: import("../../services/exception/interface.ts").ErrorHandler;
25
25
  $sce: any;
26
26
  $attr: {};
27
27
  /** @type {import("../../shared/noderef.js").NodeRef} */
@@ -26,7 +26,7 @@ export class CompileProvider {
26
26
  /**
27
27
  * @param {string|Object} name Name of the component in camelCase (i.e. `myComp` which will match `<my-comp>`),
28
28
  * or an object map of components where the keys are the names and the values are the component definition objects.
29
- * @param {import("../../interface.js").ComponentOptions} options Component definition object (a simplified
29
+ * @param {import("../../interface.js").Component} options Component definition object (a simplified
30
30
  * {directive definition object}),
31
31
  * with the following properties (all optional):
32
32
  *
@@ -69,7 +69,7 @@ export class CompileProvider {
69
69
  */
70
70
  component: (
71
71
  name: string | any,
72
- options: import("../../interface.js").ComponentOptions,
72
+ options: import("../../interface.js").Component,
73
73
  ) => CompileProvider;
74
74
  /**
75
75
  * Retrieves or overrides the default regular expression that is used for determining trusted safe
@@ -35,7 +35,7 @@ export class ControllerProvider {
35
35
  | string
36
36
  | ((
37
37
  $injector: import("../../core/di/internal-injector.js").InjectorService,
38
- ) => Function)
38
+ ) => import("./interface.js").ControllerService)
39
39
  )[];
40
40
  /**
41
41
  * Adds an identifier to the controller instance in the given locals' scope.
@@ -0,0 +1,6 @@
1
+ export type ControllerService = (
2
+ expression: string | Function | any[],
3
+ locals?: Record<string, any>,
4
+ later?: boolean,
5
+ ident?: string,
6
+ ) => object | (() => object);
@@ -22,12 +22,12 @@ export class NgModule {
22
22
  /**
23
23
  * @param {string} name - Name of the module
24
24
  * @param {Array<string>} requires - List of modules which the injector will load before the current module
25
- * @param {import("../../interface.js").Injectable} [configFn]
25
+ * @param {import("../../interface.js").Injectable<any>} [configFn]
26
26
  */
27
27
  constructor(
28
28
  name: string,
29
29
  requires: Array<string>,
30
- configFn?: import("../../interface.js").Injectable,
30
+ configFn?: import("../../interface.js").Injectable<any>,
31
31
  );
32
32
  /**
33
33
  * Name of the current module.
@@ -46,8 +46,9 @@ export class NgModule {
46
46
  invokeQueue: Array<Array<any>>;
47
47
  /** @type {!Array<Array<*>>} */
48
48
  configBlocks: Array<Array<any>>;
49
- /** @type {!Array.<import("../../interface.js").Injectable>} */
50
- runBlocks: Array<import("../../interface.js").Injectable>;
49
+ /** @type {!Array.<import("../../interface.js").Injectable<any>>} */
50
+ runBlocks: Array<import("../../interface.js").Injectable<any>>;
51
+ services: any[];
51
52
  /**
52
53
  * @param {string} name
53
54
  * @param {any} object
@@ -62,94 +63,94 @@ export class NgModule {
62
63
  constant(name: string, object: any): NgModule;
63
64
  /**
64
65
  *
65
- * @param {import("../../interface.js").Injectable} configFn
66
+ * @param {import("../../interface.ts").Injectable<any>} configFn
66
67
  * @returns {NgModule}
67
68
  */
68
- config(configFn: import("../../interface.js").Injectable): NgModule;
69
+ config(configFn: import("../../interface.ts").Injectable<any>): NgModule;
69
70
  /**
70
- * @param {import("../../interface.js").Injectable} block
71
+ * @param {import("../../interface.ts").Injectable<any>} block
71
72
  * @returns {NgModule}
72
73
  */
73
- run(block: import("../../interface.js").Injectable): NgModule;
74
+ run(block: import("../../interface.ts").Injectable<any>): NgModule;
74
75
  /**
75
76
  * @param {string} name
76
- * @param {import("../../interface.js").ComponentOptions} options
77
+ * @param {import("../../interface.ts").Component} options
77
78
  * @returns {NgModule}
78
79
  */
79
80
  component(
80
81
  name: string,
81
- options: import("../../interface.js").ComponentOptions,
82
+ options: import("../../interface.ts").Component,
82
83
  ): NgModule;
83
84
  /**
84
85
  * @param {string} name
85
- * @param {import("../../interface.js").Injectable} providerFunction
86
+ * @param {import("../../interface.ts").Injectable<any>} providerFunction
86
87
  * @returns {NgModule}
87
88
  */
88
89
  factory(
89
90
  name: string,
90
- providerFunction: import("../../interface.js").Injectable,
91
+ providerFunction: import("../../interface.ts").Injectable<any>,
91
92
  ): NgModule;
92
93
  /**
93
94
  * @param {string} name
94
- * @param {import("../../interface.js").Injectable} serviceFunction
95
+ * @param {import("../../interface.ts").Injectable<any>} serviceFunction
95
96
  * @returns {NgModule}
96
97
  */
97
98
  service(
98
99
  name: string,
99
- serviceFunction: import("../../interface.js").Injectable,
100
+ serviceFunction: import("../../interface.ts").Injectable<any>,
100
101
  ): NgModule;
101
102
  /**
102
103
  * @param {string} name
103
- * @param {import("../../interface.js").Injectable} providerType
104
+ * @param {import("../../interface.ts").Injectable<any>} providerType
104
105
  * @returns {NgModule}
105
106
  */
106
107
  provider(
107
108
  name: string,
108
- providerType: import("../../interface.js").Injectable,
109
+ providerType: import("../../interface.ts").Injectable<any>,
109
110
  ): NgModule;
110
111
  /**
111
112
  * @param {string} name
112
- * @param {import("../../interface.js").Injectable} decorFn
113
+ * @param {import("../../interface.js").Injectable<any>} decorFn
113
114
  * @returns {NgModule}
114
115
  */
115
116
  decorator(
116
117
  name: string,
117
- decorFn: import("../../interface.js").Injectable,
118
+ decorFn: import("../../interface.js").Injectable<any>,
118
119
  ): NgModule;
119
120
  /**
120
121
  * @param {string} name
121
- * @param {import("../../interface.js").Injectable} directiveFactory
122
+ * @param {import("../../interface.js").Injectable<any>} directiveFactory
122
123
  * @returns {NgModule}
123
124
  */
124
125
  directive(
125
126
  name: string,
126
- directiveFactory: import("../../interface.js").Injectable,
127
+ directiveFactory: import("../../interface.js").Injectable<any>,
127
128
  ): NgModule;
128
129
  /**
129
130
  * @param {string} name
130
- * @param {import("../../interface.js").Injectable} animationFactory
131
+ * @param {import("../../interface.js").Injectable<any>} animationFactory
131
132
  * @returns {NgModule}
132
133
  */
133
134
  animation(
134
135
  name: string,
135
- animationFactory: import("../../interface.js").Injectable,
136
+ animationFactory: import("../../interface.js").Injectable<any>,
136
137
  ): NgModule;
137
138
  /**
138
139
  * @param {string} name
139
- * @param {import("../../interface.js").Injectable} filterFn
140
+ * @param {import("../../interface.js").Injectable<any>} filterFn
140
141
  * @return {NgModule}
141
142
  */
142
143
  filter(
143
144
  name: string,
144
- filterFn: import("../../interface.js").Injectable,
145
+ filterFn: import("../../interface.js").Injectable<any>,
145
146
  ): NgModule;
146
147
  /**
147
148
  * @param {string} name
148
- * @param {import("../../interface.js").Injectable} ctlFn
149
+ * @param {import("../../interface.js").Injectable<any>} ctlFn
149
150
  * @returns {NgModule}
150
151
  */
151
152
  controller(
152
153
  name: string,
153
- ctlFn: import("../../interface.js").Injectable,
154
+ ctlFn: import("../../interface.js").Injectable<any>,
154
155
  ): NgModule;
155
156
  }
@@ -6,18 +6,18 @@ export class FilterProvider {
6
6
  constructor($provide: import("../../interface.ts").Provider);
7
7
  $provide: import("../../interface.ts").Provider;
8
8
  /**
9
- * @param {string|Record<string, import('../../interface.ts').FilterFactory>} name
10
- * @param {import('../../interface.ts').FilterFactory} [factory]
9
+ * @param {string|Record<string, ng.FilterFn>} name
10
+ * @param {ng.FilterService} [factory]
11
11
  * @return {import('../../interface.ts').Provider}
12
12
  */
13
13
  register(
14
- name: string | Record<string, import("../../interface.ts").FilterFactory>,
15
- factory?: import("../../interface.ts").FilterFactory,
14
+ name: string | Record<string, ng.FilterFn>,
15
+ factory?: ng.FilterService,
16
16
  ): import("../../interface.ts").Provider;
17
17
  $get: (
18
18
  | string
19
19
  | ((
20
20
  $injector: import("../../core/di/internal-injector.js").InjectorService,
21
- ) => import("../../interface.ts").FilterFn)
21
+ ) => ng.FilterService)
22
22
  )[];
23
23
  }
@@ -0,0 +1,13 @@
1
+ export interface InterpolationFunction {
2
+ (context: any): string;
3
+ }
4
+ export interface InterpolateService {
5
+ (
6
+ text: string,
7
+ mustHaveExpression?: boolean,
8
+ trustedContext?: string,
9
+ allOrNothing?: boolean,
10
+ ): InterpolationFunction | undefined;
11
+ endSymbol(): string;
12
+ startSymbol(): string;
13
+ }
@@ -21,18 +21,6 @@ export class InterpolateProvider {
21
21
  endSymbol: string;
22
22
  $get: (
23
23
  | string
24
- | ((
25
- $parse: import("../parse/interface.ts").ParseService,
26
- $sce: any,
27
- ) => {
28
- (
29
- text: string,
30
- mustHaveExpression?: boolean | undefined,
31
- trustedContext?: string | undefined,
32
- allOrNothing?: boolean | undefined,
33
- ): Function;
34
- startSymbol(): string;
35
- endSymbol(): string;
36
- })
24
+ | (($parse: ng.ParseService, $sce: any) => ng.InterpolateService)
37
25
  )[];
38
26
  }
@@ -208,7 +208,10 @@ export class Scope {
208
208
  * @returns {any}
209
209
  */
210
210
  $broadcast(name: string, ...args: any[]): any;
211
- $postUpdate(fn: any): void;
211
+ /**
212
+ * @param {Function} fn
213
+ */
214
+ $postUpdate(fn: Function): void;
212
215
  $destroy(): void;
213
216
  /**
214
217
  * Searches the scope instance
@@ -12,35 +12,35 @@ export function getEventNameForElement(element: Element): EventType;
12
12
  * Handles DOM manipulation based on a swap strategy and server-rendered HTML.
13
13
  *
14
14
  * @param {string} html - The HTML string returned from the server.
15
- * @param {import("../../interface.ts").SwapModeType} swap
15
+ * @param {import("./interface.ts").SwapModeType} swap
16
16
  * @param {Element} target - The target DOM element to apply the swap to.
17
- * @param {import('../../core/scope/scope.js').Scope} scope
18
- * @param {import('../../core/compile/compile.js').CompileFn} $compile
17
+ * @param {ng.Scope} scope
18
+ * @param {ng.CompileService} $compile
19
19
  */
20
20
  export function handleSwapResponse(
21
21
  html: string,
22
- swap: import("../../interface.ts").SwapModeType,
22
+ swap: import("./interface.ts").SwapModeType,
23
23
  target: Element,
24
- scope: import("../../core/scope/scope.js").Scope,
25
- $compile: import("../../core/compile/compile.js").CompileFn,
24
+ scope: ng.Scope,
25
+ $compile: ng.CompileService,
26
26
  ): void;
27
27
  /**
28
28
  * Creates an HTTP directive factory that supports GET, DELETE, POST, PUT.
29
29
  *
30
30
  * @param {"get" | "delete" | "post" | "put"} method - HTTP method to use.
31
31
  * @param {string} attrName - Attribute name containing the URL.
32
- * @returns {import('../../interface.ts').DirectiveFactory}
32
+ * @returns {ng.DirectiveFactory}
33
33
  */
34
34
  export function createHttpDirective(
35
35
  method: "get" | "delete" | "post" | "put",
36
36
  attrName: string,
37
- ): import("../../interface.ts").DirectiveFactory;
38
- /** @type {import('../../interface.ts').DirectiveFactory} */
39
- export const ngGetDirective: import("../../interface.ts").DirectiveFactory;
40
- /** @type {import('../../interface.ts').DirectiveFactory} */
41
- export const ngDeleteDirective: import("../../interface.ts").DirectiveFactory;
42
- /** @type {import('../../interface.ts').DirectiveFactory} */
43
- export const ngPostDirective: import("../../interface.ts").DirectiveFactory;
44
- /** @type {import('../../interface.ts').DirectiveFactory} */
45
- export const ngPutDirective: import("../../interface.ts").DirectiveFactory;
37
+ ): ng.DirectiveFactory;
38
+ /** @type {ng.DirectiveFactory} */
39
+ export const ngGetDirective: ng.DirectiveFactory;
40
+ /** @type {ng.DirectiveFactory} */
41
+ export const ngDeleteDirective: ng.DirectiveFactory;
42
+ /** @type {ng.DirectiveFactory} */
43
+ export const ngPostDirective: ng.DirectiveFactory;
44
+ /** @type {ng.DirectiveFactory} */
45
+ export const ngPutDirective: ng.DirectiveFactory;
46
46
  export type EventType = "click" | "change" | "submit";
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Possible values for `data-swap` attribute
3
+ */
4
+ export declare const SwapMode: {
5
+ /** (default) Replaces the contents inside the element */
6
+ readonly innerHTML: "innerHTML";
7
+ /** Replaces the entire element, including the tag itself */
8
+ readonly outerHTML: "outerHTML";
9
+ /** Inserts plain text (without parsing HTML) */
10
+ readonly textContent: "textContent";
11
+ /** Inserts HTML immediately before the element itself */
12
+ readonly beforebegin: "beforebegin";
13
+ /** Inserts HTML inside the element, before its first child */
14
+ readonly afterbegin: "afterbegin";
15
+ /** Inserts HTML inside the element, after its last child */
16
+ readonly beforeend: "beforeend";
17
+ /** Inserts HTML immediately after the element itself */
18
+ readonly afterend: "afterend";
19
+ /** Removes the element entirely */
20
+ readonly delete: "delete";
21
+ /** Performs no insertion (no-op) */
22
+ readonly none: "none";
23
+ };
24
+ /**
25
+ * Union type representing all possible DOM insertion modes.
26
+ */
27
+ export type SwapModeType = keyof typeof SwapMode;
@@ -1,16 +1,16 @@
1
1
  /**
2
2
  *
3
3
  * @param {*} $templateRequest
4
- * @param {import("../../services/anchor-scroll.js").AnchorScrollFunction} $anchorScroll
4
+ * @param {import("../../services/anchor-scroll/anchor-scroll.js").AnchorScrollFunction} $anchorScroll
5
5
  * @param {*} $animate
6
- * @param {import('../../services/exception/interface.ts').Interface} $exceptionHandler
6
+ * @param {import('../../services/exception/interface.ts').ErrorHandler} $exceptionHandler
7
7
  * @returns {import('../../interface.js').Directive}
8
8
  */
9
9
  export function ngIncludeDirective(
10
10
  $templateRequest: any,
11
- $anchorScroll: import("../../services/anchor-scroll.js").AnchorScrollFunction,
11
+ $anchorScroll: import("../../services/anchor-scroll/anchor-scroll.js").AnchorScrollFunction,
12
12
  $animate: any,
13
- $exceptionHandler: import("../../services/exception/interface.ts").Interface,
13
+ $exceptionHandler: import("../../services/exception/interface.ts").ErrorHandler,
14
14
  ): import("../../interface.js").Directive;
15
15
  export namespace ngIncludeDirective {
16
16
  let $inject: string[];
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @param {ng.LogService} $log
3
+ * @param {ng.InjectorService} $injector
4
+ * @returns {import('interface.ts').Directive}
5
+ */
6
+ export function ngInjectDirective(
7
+ $log: ng.LogService,
8
+ $injector: ng.InjectorService,
9
+ ): any;
10
+ export namespace ngInjectDirective {
11
+ let $inject: string[];
12
+ }
@@ -141,7 +141,7 @@ export class NgModelController {
141
141
  $$element: Element;
142
142
  $$animate: any;
143
143
  $$parse: import("../../core/parse/interface.ts").ParseService;
144
- $$exceptionHandler: import("../../services/exception/interface.ts").Interface;
144
+ $$exceptionHandler: import("../../services/exception/interface.ts").ErrorHandler;
145
145
  $$hasNativeValidators: boolean;
146
146
  $$classCache: {};
147
147
  $$eventRemovers: Set<any>;
@@ -1,9 +1,9 @@
1
1
  /**
2
- * @param {import('../../services/template-cache/interface.ts').TemplateCache} $templateCache
2
+ * @param {ng.TemplateCacheService} $templateCache
3
3
  * @returns {import('../../interface.ts').Directive}
4
4
  */
5
5
  export function scriptDirective(
6
- $templateCache: import("../../services/template-cache/interface.ts").TemplateCache,
6
+ $templateCache: ng.TemplateCacheService,
7
7
  ): import("../../interface.ts").Directive;
8
8
  export namespace scriptDirective {
9
9
  let $inject: string[];
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @param {import('../../core/parse/interface.ts').ParseService} $parse
3
- * @param {import('../../services/log/interface.ts').LogService} $log
2
+ * @param {ng.ParseService} $parse
3
+ * @param {ng.LogService} $log
4
4
  * @returns {import('interface.ts').Directive}
5
5
  */
6
6
  export function ngSetterDirective(
7
- $parse: import("../../core/parse/interface.ts").ParseService,
8
- $log: import("../../services/log/interface.ts").LogService,
7
+ $parse: ng.ParseService,
8
+ $log: ng.LogService,
9
9
  ): any;
10
10
  export namespace ngSetterDirective {
11
11
  let $inject: string[];
@@ -1,4 +1,4 @@
1
1
  /**
2
- * @returns {import('../interface.ts').FilterFn}
2
+ * @returns {ng.FilterFn}
3
3
  */
4
- export function filterFilter(): import("../interface.ts").FilterFn;
4
+ export function filterFilter(): ng.FilterFn;
@@ -33,6 +33,6 @@ export function formatNumber(
33
33
  fractionSize: any,
34
34
  ): string;
35
35
  /**
36
- * @returns {import('../interface.ts').FilterFn}
36
+ * @returns {ng.FilterFn}
37
37
  */
38
- export function jsonFilter(): import("../interface.ts").FilterFn;
38
+ export function jsonFilter(): ng.FilterFn;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * A filter function takes an input and optional arguments, and returns a transformed value.
3
+ */
4
+ export type FilterFn = (input: any, ...args: any[]) => any;
5
+ /**
6
+ * A filter factory function that returns a FilterFn.
7
+ */
8
+ export type FilterFactory = (...args: any[]) => FilterFn;
@@ -1,4 +1,4 @@
1
1
  /**
2
- * @returns {import('../interface.ts').FilterFn}
2
+ * @returns {ng.FilterFn}
3
3
  */
4
- export function limitToFilter(): import("../interface.ts").FilterFn;
4
+ export function limitToFilter(): ng.FilterFn;
@@ -1,7 +1,7 @@
1
1
  /**
2
- * @returns {import('../interface.ts').FilterFn}
2
+ * @returns {ng.FilterFn}
3
3
  */
4
- export function orderByFilter($parse: any): import("../interface.ts").FilterFn;
4
+ export function orderByFilter($parse: any): ng.FilterFn;
5
5
  export namespace orderByFilter {
6
6
  let $inject: string[];
7
7
  }
package/@types/index.d.ts CHANGED
@@ -1,2 +1,85 @@
1
- export const angular: Angular;
1
+ import {
2
+ AnchorScrollProvider,
3
+ AnchorScrollService as TAnchorScrollService,
4
+ } from "./services/anchor-scroll/anchor-scroll.js";
5
+ import { ControllerService as TControllerService } from "./core/controller/interface.ts";
6
+ import { ErrorHandler } from "./services/exception/interface.ts";
7
+ export * from "./services/http/interface.ts";
8
+ export * from "./services/log/interface.ts";
9
+ export * from "./services/log/log.js";
10
+ export * from "./services/location/interface.ts";
11
+ export * from "./services/location/location.js";
12
+ export * from "./services/pubsub/pubsub.js";
13
+ export * from "./services/template-cache/template-cache.js";
14
+ export * from "./index.js";
2
15
  import { Angular } from "./angular.js";
16
+ import { Attributes } from "./core/compile/attributes.js";
17
+ import { Scope } from "./core/scope/scope.js";
18
+ import { NgModule } from "./core/di/ng-module.js";
19
+ import { PubSubProvider, PubSub } from "./services/pubsub/pubsub.js";
20
+ import type { ErrorHandlingConfig as TErrorHandlingConfig } from "./shared/interface.ts";
21
+ import { InjectorService } from "./core/di/internal-injector.js";
22
+ import { CompileFn } from "./core/compile/compile.js";
23
+ import {
24
+ HttpParamSerializer,
25
+ HttpService as THttpService,
26
+ LogService as TLogService,
27
+ } from "./interface.ts";
28
+ import { ParseService as TParseService } from "./core/parse/interface.ts";
29
+ import { TemplateRequestService as TTemplateRequestService } from "./services/template-request/interface.ts";
30
+ import { HttpParamSerializerProvider } from "./services/http/http.js";
31
+ import { FilterFactory, FilterFn as TFilterFn } from "./filters/interface.ts";
32
+ import { InterpolateService as TInterpolateService } from "./core/interpolate/interface.ts";
33
+ import { InterpolateProvider } from "./core/interpolate/interpolate.js";
34
+ import { SceDelegateProvider, SceProvider } from "./services/sce/sce.js";
35
+ import {
36
+ Directive as TDirective,
37
+ DirectiveFactory as TDirectiveFactory,
38
+ Component as TComponent,
39
+ Controller as TController,
40
+ } from "./interface.ts";
41
+ import { StateProvider } from "./router/state/state-service.js";
42
+ declare global {
43
+ interface Function {
44
+ $inject?: readonly string[] | undefined;
45
+ }
46
+ namespace ng {
47
+ type Angular = InstanceType<typeof Angular>;
48
+ type Attributes = InstanceType<typeof Attributes>;
49
+ type Directive = TDirective;
50
+ type DirectiveFactory = TDirectiveFactory;
51
+ type Component = TComponent;
52
+ type Controller = TController;
53
+ type Scope = InstanceType<typeof Scope>;
54
+ type NgModule = InstanceType<typeof NgModule>;
55
+ type PubSubProvider = InstanceType<typeof PubSubProvider>;
56
+ type FilterFn = TFilterFn;
57
+ type AnchorScrollProvider = InstanceType<typeof AnchorScrollProvider>;
58
+ type InterpolateProvider = InstanceType<typeof InterpolateProvider>;
59
+ type HttpParamSerializerProvider = InstanceType<
60
+ typeof HttpParamSerializerProvider
61
+ >;
62
+ type SceProvider = InstanceType<typeof SceProvider>;
63
+ type SceDelegateProvider = InstanceType<typeof SceDelegateProvider>;
64
+ type AnchorScrollService = TAnchorScrollService;
65
+ type CompileService = CompileFn;
66
+ type ControllerService = TControllerService;
67
+ type ExceptionHandlerService = ErrorHandler;
68
+ type FilterService = FilterFactory;
69
+ type HttpParamSerializerSerService = HttpParamSerializer;
70
+ type HttpService = THttpService;
71
+ type InterpolateService = TInterpolateService;
72
+ type InjectorService = InstanceType<typeof InjectorService>;
73
+ type LogService = TLogService;
74
+ type ParseService = TParseService;
75
+ type PubSubService = InstanceType<typeof PubSub>;
76
+ type RootElementService = Element;
77
+ type RootScopeService = InstanceType<typeof Scope>;
78
+ type StateService = InstanceType<typeof StateProvider>;
79
+ type TemplateCacheService = InstanceType<typeof Map<string, string>>;
80
+ type TemplateRequestService = TTemplateRequestService;
81
+ type ErrorHandlingConfig = TErrorHandlingConfig;
82
+ type WindowService = Window;
83
+ type DocumentService = Document;
84
+ }
85
+ }