@angular-wave/angular.ts 0.9.3 → 0.9.5

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 (703) 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/interface.d.ts +105 -82
  26. package/@types/namespace.d.ts +76 -0
  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 +8 -8
  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 +510 -570
  49. package/dist/angular-ts.umd.js +510 -570
  50. package/dist/angular-ts.umd.min.js +1 -1
  51. package/package.json +8 -1
  52. package/.github/workflows/ci.yml +0 -104
  53. package/.github/workflows/gh-pages.yml +0 -75
  54. package/.husky/pre-commit +0 -5
  55. package/.prettierignore +0 -9
  56. package/@types/services/cookie-reader.d.ts +0 -4
  57. package/@types/services/http-backend/http-backend.d.ts +0 -58
  58. package/@types/services/template-cache/interface.d.ts +0 -10
  59. package/CHANGELOG.md +0 -17667
  60. package/CODE_OF_CONDUCT.md +0 -3
  61. package/CONTRIBUTING.md +0 -247
  62. package/DEVELOPERS.md +0 -499
  63. package/Makefile +0 -60
  64. package/RELEASE.md +0 -86
  65. package/TRIAGING.md +0 -127
  66. package/docs/.cspell.yml +0 -8
  67. package/docs/.github/dependabot.yml +0 -14
  68. package/docs/.nvmrc +0 -1
  69. package/docs/CONTRIBUTING.md +0 -28
  70. package/docs/Dockerfile +0 -4
  71. package/docs/LICENSE +0 -201
  72. package/docs/README.md +0 -217
  73. package/docs/assets/icons/logo.svg +0 -1
  74. package/docs/assets/scss/_variables_project.scss +0 -12
  75. package/docs/assets/scss/_variables_project_after_bs.scss +0 -8
  76. package/docs/assets/scss/index.scss +0 -48
  77. package/docs/config.yaml +0 -15
  78. package/docs/content/_index.md +0 -28
  79. package/docs/content/docs/_index.md +0 -61
  80. package/docs/content/docs/directive/_index.md +0 -4
  81. package/docs/content/docs/directive/app.md +0 -11
  82. package/docs/content/docs/directive/aria.md +0 -0
  83. package/docs/content/docs/directive/bind.md +0 -72
  84. package/docs/content/docs/directive/blur.md +0 -38
  85. package/docs/content/docs/directive/channel.md +0 -37
  86. package/docs/content/docs/directive/class-even.md +0 -47
  87. package/docs/content/docs/directive/class-odd.md +0 -48
  88. package/docs/content/docs/directive/class.md +0 -64
  89. package/docs/content/docs/directive/click.md +0 -41
  90. package/docs/content/docs/directive/cloak.md +0 -74
  91. package/docs/content/docs/directive/copy.md +0 -38
  92. package/docs/content/docs/directive/cut.md +0 -40
  93. package/docs/content/docs/directive/dblclick.md +0 -41
  94. package/docs/content/docs/directive/focus.md +0 -38
  95. package/docs/content/docs/directive/get.md +0 -203
  96. package/docs/content/docs/directive/include.md +0 -7
  97. package/docs/content/docs/directive/keydown.md +0 -38
  98. package/docs/content/docs/directive/keyup.md +0 -38
  99. package/docs/content/docs/directive/load.md +0 -43
  100. package/docs/content/docs/directive/mousedown.md +0 -38
  101. package/docs/content/docs/directive/mouseenter.md +0 -38
  102. package/docs/content/docs/directive/mouseleave.md +0 -38
  103. package/docs/content/docs/directive/mousemove.md +0 -38
  104. package/docs/content/docs/directive/mouseout.md +0 -38
  105. package/docs/content/docs/directive/mouseover.md +0 -38
  106. package/docs/content/docs/directive/mouseup.md +0 -38
  107. package/docs/content/docs/directive/non-bindable.md +0 -28
  108. package/docs/content/docs/filter/_index.md +0 -4
  109. package/docs/content/docs/provider/_index.md +0 -4
  110. package/docs/content/docs/provider/eventBusProvider.md +0 -35
  111. package/docs/content/docs/provider/locationProvider.md +0 -26
  112. package/docs/content/docs/provider/logProvider.md +0 -59
  113. package/docs/content/docs/provider/templateCacheProvider.md +0 -100
  114. package/docs/content/docs/service/_index.md +0 -4
  115. package/docs/content/docs/service/eventBus.md +0 -56
  116. package/docs/content/docs/service/location.md +0 -57
  117. package/docs/content/docs/service/log.md +0 -113
  118. package/docs/content/docs/service/templateCache.md +0 -64
  119. package/docs/content/docs/service/url.md +0 -5
  120. package/docs/docker-compose.yaml +0 -12
  121. package/docs/docsy.work +0 -5
  122. package/docs/docsy.work.sum +0 -0
  123. package/docs/go.mod +0 -5
  124. package/docs/go.sum +0 -6
  125. package/docs/hugo-disabled.toml +0 -220
  126. package/docs/hugo.yaml +0 -200
  127. package/docs/layouts/404.html +0 -13
  128. package/docs/layouts/_markup/render-heading.html +0 -1
  129. package/docs/layouts/partials/hooks/head-end.html +0 -3
  130. package/docs/layouts/shortcodes/showcss.html +0 -2
  131. package/docs/layouts/shortcodes/showhtml.html +0 -2
  132. package/docs/layouts/shortcodes/showjs.html +0 -2
  133. package/docs/layouts/shortcodes/showraw.html +0 -1
  134. package/docs/layouts/shortcodes/version.html +0 -1
  135. package/docs/package-lock.json +0 -2293
  136. package/docs/package.json +0 -53
  137. package/docs/static/examples/counter/counter-test.html +0 -13
  138. package/docs/static/examples/counter/counter.html +0 -5
  139. package/docs/static/examples/counter/counter.test.js +0 -28
  140. package/docs/static/examples/eventbus/eventbus-test.html +0 -15
  141. package/docs/static/examples/eventbus/eventbus.html +0 -13
  142. package/docs/static/examples/eventbus/eventbus.js +0 -15
  143. package/docs/static/examples/eventbus/eventbus.test.js +0 -19
  144. package/docs/static/examples/ng-bind/ng-bind.html +0 -9
  145. package/docs/static/examples/ng-blur/ng-blur.html +0 -9
  146. package/docs/static/examples/ng-channel/ng-channel-test.html +0 -17
  147. package/docs/static/examples/ng-channel/ng-channel.html +0 -24
  148. package/docs/static/examples/ng-channel/ng-channel.test.js +0 -31
  149. package/docs/static/examples/ng-class/ng-class.html +0 -71
  150. package/docs/static/examples/ng-class-even/ng-class-even.html +0 -8
  151. package/docs/static/examples/ng-class-odd/ng-class-odd.html +0 -8
  152. package/docs/static/examples/ng-click/ng-click.html +0 -6
  153. package/docs/static/examples/ng-copy/ng-copy.html +0 -6
  154. package/docs/static/examples/ng-cut/ng-cut.html +0 -6
  155. package/docs/static/examples/ng-dblclick/ng-dblclick.html +0 -10
  156. package/docs/static/examples/ng-focus/ng-focus.html +0 -9
  157. package/docs/static/examples/ng-keydown/ng-keydown.html +0 -9
  158. package/docs/static/examples/ng-keyup/ng-keyup.html +0 -9
  159. package/docs/static/examples/ng-load/ng-load.html +0 -8
  160. package/docs/static/examples/ng-mousedown/ng-mousedown.html +0 -6
  161. package/docs/static/examples/ng-mouseenter/ng-mouseenter.html +0 -4
  162. package/docs/static/examples/ng-mouseleave/ng-mouseleave.html +0 -4
  163. package/docs/static/examples/ng-mousemove/ng-mousemove.html +0 -4
  164. package/docs/static/examples/ng-mouseout/ng-mouseout.html +0 -4
  165. package/docs/static/examples/ng-mouseover/ng-mouseover.html +0 -4
  166. package/docs/static/examples/ng-mouseup/ng-mouseup.html +0 -4
  167. package/docs/static/examples/ng-non-bindable/ng-non-bindable-test.html +0 -13
  168. package/docs/static/examples/ng-non-bindable/ng-non-bindable.html +0 -3
  169. package/docs/static/examples/ng-non-bindable/ng-non-bindable.test.js +0 -11
  170. package/docs/static/typedoc/.nojekyll +0 -1
  171. package/docs/static/typedoc/assets/hierarchy.js +0 -1
  172. package/docs/static/typedoc/assets/highlight.css +0 -78
  173. package/docs/static/typedoc/assets/icons.js +0 -18
  174. package/docs/static/typedoc/assets/icons.svg +0 -1
  175. package/docs/static/typedoc/assets/main.js +0 -60
  176. package/docs/static/typedoc/assets/navigation.js +0 -1
  177. package/docs/static/typedoc/assets/search.js +0 -1
  178. package/docs/static/typedoc/assets/style.css +0 -1633
  179. package/docs/static/typedoc/classes/Location.html +0 -55
  180. package/docs/static/typedoc/classes/LocationProvider.html +0 -20
  181. package/docs/static/typedoc/classes/LogProvider.html +0 -6
  182. package/docs/static/typedoc/classes/PubSub.html +0 -71
  183. package/docs/static/typedoc/classes/PubSubProvider.html +0 -3
  184. package/docs/static/typedoc/classes/TemplateCacheProvider.html +0 -5
  185. package/docs/static/typedoc/hierarchy.html +0 -1
  186. package/docs/static/typedoc/index.html +0 -1
  187. package/docs/static/typedoc/interfaces/ChangesObject.html +0 -6
  188. package/docs/static/typedoc/interfaces/ComponentOptions.html +0 -16
  189. package/docs/static/typedoc/interfaces/Controller.html +0 -12
  190. package/docs/static/typedoc/interfaces/DefaultPorts.html +0 -5
  191. package/docs/static/typedoc/interfaces/Directive.html +0 -37
  192. package/docs/static/typedoc/interfaces/DirectivePrePost.html +0 -4
  193. package/docs/static/typedoc/interfaces/Html5Mode.html +0 -23
  194. package/docs/static/typedoc/interfaces/HttpHeadersGetter.html +0 -1
  195. package/docs/static/typedoc/interfaces/HttpProviderDefaults.html +0 -31
  196. package/docs/static/typedoc/interfaces/HttpRequestConfigHeaders.html +0 -6
  197. package/docs/static/typedoc/interfaces/HttpRequestTransformer.html +0 -1
  198. package/docs/static/typedoc/interfaces/HttpResponse.html +0 -7
  199. package/docs/static/typedoc/interfaces/HttpResponseTransformer.html +0 -1
  200. package/docs/static/typedoc/interfaces/HttpService.html +0 -38
  201. package/docs/static/typedoc/interfaces/LogService.html +0 -12
  202. package/docs/static/typedoc/interfaces/NgModelController.html +0 -30
  203. package/docs/static/typedoc/interfaces/NgModelOptions.html +0 -16
  204. package/docs/static/typedoc/interfaces/Provider.html +0 -34
  205. package/docs/static/typedoc/interfaces/RequestConfig.html +0 -48
  206. package/docs/static/typedoc/interfaces/RequestShortcutConfig.html +0 -38
  207. package/docs/static/typedoc/interfaces/ServiceProvider.html +0 -5
  208. package/docs/static/typedoc/interfaces/TemplateCache.html +0 -7
  209. package/docs/static/typedoc/interfaces/TranscludeFunctionObject.html +0 -8
  210. package/docs/static/typedoc/interfaces/UrlParts.html +0 -9
  211. package/docs/static/typedoc/types/AnnotatedDirectiveFactory.html +0 -1
  212. package/docs/static/typedoc/types/AnnotatedFactory.html +0 -8
  213. package/docs/static/typedoc/types/CloneAttachFunction.html +0 -2
  214. package/docs/static/typedoc/types/ControllerConstructor.html +0 -2
  215. package/docs/static/typedoc/types/DirectiveCompileFn.html +0 -2
  216. package/docs/static/typedoc/types/DirectiveController.html +0 -2
  217. package/docs/static/typedoc/types/DirectiveFactory.html +0 -1
  218. package/docs/static/typedoc/types/DirectiveFactoryFn.html +0 -1
  219. package/docs/static/typedoc/types/DirectiveLinkFn.html +0 -2
  220. package/docs/static/typedoc/types/ExpandoStore.html +0 -2
  221. package/docs/static/typedoc/types/Expression.html +0 -6
  222. package/docs/static/typedoc/types/FilterFactory.html +0 -2
  223. package/docs/static/typedoc/types/FilterFn.html +0 -2
  224. package/docs/static/typedoc/types/HttpPromise.html +0 -1
  225. package/docs/static/typedoc/types/HttpResponseStatus.html +0 -1
  226. package/docs/static/typedoc/types/Injectable.html +0 -4
  227. package/docs/static/typedoc/types/InjectableClass.html +0 -1
  228. package/docs/static/typedoc/types/InjectableFactory.html +0 -1
  229. package/docs/static/typedoc/types/LogCall.html +0 -2
  230. package/docs/static/typedoc/types/LogServiceFactory.html +0 -2
  231. package/docs/static/typedoc/types/OnChangesObject.html +0 -2
  232. package/docs/static/typedoc/types/SwapModeType.html +0 -2
  233. package/docs/static/typedoc/types/TController.html +0 -2
  234. package/docs/static/typedoc/types/UrlChangeListener.html +0 -5
  235. package/docs/static/typedoc/variables/EventBus.html +0 -1
  236. package/docs/static/typedoc/variables/SwapMode.html +0 -11
  237. package/docs/static/version.js +0 -13
  238. package/docs/test-results/.last-run.json +0 -4
  239. package/docs/test-results/static-examples-counter-counter-counter-example/error-context.md +0 -50
  240. package/eslint.config.js +0 -26
  241. package/images/android-chrome-192x192.png +0 -0
  242. package/images/android-chrome-512x512.png +0 -0
  243. package/images/apple-touch-icon.png +0 -0
  244. package/images/favicon-16x16.png +0 -0
  245. package/images/favicon-32x32.png +0 -0
  246. package/images/favicon.ico +0 -0
  247. package/images/site.webmanifest +0 -19
  248. package/index.html +0 -86
  249. package/legacy.d.ts +0 -2599
  250. package/playwright.config.ts +0 -81
  251. package/public/jasmine/boot0.js +0 -66
  252. package/public/jasmine/boot1.js +0 -134
  253. package/public/jasmine/jasmine-html.js +0 -970
  254. package/public/jasmine/jasmine.css +0 -323
  255. package/public/jasmine/jasmine.js +0 -11406
  256. package/public/public/README.md +0 -1
  257. package/public/public/circle.html +0 -1
  258. package/public/public/jasmine-helper.css +0 -9
  259. package/public/public/my_child_directive.html +0 -1
  260. package/public/public/my_directive.html +0 -1
  261. package/public/public/my_other_directive.html +0 -1
  262. package/public/public/test.html +0 -1
  263. package/rollup.config.js +0 -51
  264. package/src/angular.js +0 -293
  265. package/src/angular.spec.js +0 -1191
  266. package/src/animations/animate-cache.js +0 -80
  267. package/src/animations/animate-children-directive.js +0 -32
  268. package/src/animations/animate-children-directive.md +0 -80
  269. package/src/animations/animate-css-driver.js +0 -284
  270. package/src/animations/animate-css.html +0 -58
  271. package/src/animations/animate-css.js +0 -915
  272. package/src/animations/animate-css.md +0 -263
  273. package/src/animations/animate-js-driver.js +0 -60
  274. package/src/animations/animate-js.html +0 -47
  275. package/src/animations/animate-js.js +0 -371
  276. package/src/animations/animate-queue.js +0 -859
  277. package/src/animations/animate-runner.js +0 -193
  278. package/src/animations/animate-swap.js +0 -33
  279. package/src/animations/animate-swap.md +0 -88
  280. package/src/animations/animate.html +0 -19
  281. package/src/animations/animate.js +0 -546
  282. package/src/animations/animate.md +0 -933
  283. package/src/animations/animate.spec.js +0 -490
  284. package/src/animations/animation.js +0 -519
  285. package/src/animations/animations.test.js +0 -10
  286. package/src/animations/interface.ts +0 -19
  287. package/src/animations/raf-scheduler.html +0 -19
  288. package/src/animations/raf-scheduler.js +0 -92
  289. package/src/animations/raf-scheduler.spec.js +0 -98
  290. package/src/animations/shared.js +0 -341
  291. package/src/binding.html +0 -19
  292. package/src/binding.spec.js +0 -474
  293. package/src/binding.test.js +0 -10
  294. package/src/core/compile/attributes.js +0 -337
  295. package/src/core/compile/compile.html +0 -19
  296. package/src/core/compile/compile.js +0 -3270
  297. package/src/core/compile/compile.md +0 -1128
  298. package/src/core/compile/compile.spec.js +0 -15574
  299. package/src/core/compile/compile.test.js +0 -12
  300. package/src/core/controller/controller.html +0 -22
  301. package/src/core/controller/controller.js +0 -189
  302. package/src/core/controller/controller.spec.js +0 -334
  303. package/src/core/controller/controller.test.js +0 -12
  304. package/src/core/core.html +0 -20
  305. package/src/core/core.test.js +0 -12
  306. package/src/core/di/injector.html +0 -19
  307. package/src/core/di/injector.js +0 -307
  308. package/src/core/di/injector.md +0 -740
  309. package/src/core/di/injector.spec.js +0 -2310
  310. package/src/core/di/injector.test.js +0 -12
  311. package/src/core/di/internal-injector.js +0 -284
  312. package/src/core/di/ng-module.html +0 -19
  313. package/src/core/di/ng-module.js +0 -226
  314. package/src/core/di/ng-module.spec.js +0 -263
  315. package/src/core/di/ng-module.test.js +0 -12
  316. package/src/core/filter/filter.html +0 -19
  317. package/src/core/filter/filter.js +0 -55
  318. package/src/core/filter/filter.md +0 -132
  319. package/src/core/filter/filter.spec.js +0 -149
  320. package/src/core/filter/filter.test.js +0 -12
  321. package/src/core/interpolate/interpolate.html +0 -22
  322. package/src/core/interpolate/interpolate.js +0 -408
  323. package/src/core/interpolate/interpolate.spec.js +0 -601
  324. package/src/core/interpolate/interpolate.test.js +0 -12
  325. package/src/core/parse/ast/ast-node.ts +0 -81
  326. package/src/core/parse/ast/ast.html +0 -19
  327. package/src/core/parse/ast/ast.js +0 -574
  328. package/src/core/parse/ast/ast.spec.js +0 -1453
  329. package/src/core/parse/ast/ast.test.js +0 -10
  330. package/src/core/parse/ast-type.js +0 -23
  331. package/src/core/parse/interface.ts +0 -84
  332. package/src/core/parse/interpreter.js +0 -915
  333. package/src/core/parse/lexer/lexer.html +0 -19
  334. package/src/core/parse/lexer/lexer.js +0 -338
  335. package/src/core/parse/lexer/lexer.spec.js +0 -303
  336. package/src/core/parse/lexer/lexer.test.js +0 -10
  337. package/src/core/parse/lexer/token.ts +0 -22
  338. package/src/core/parse/parse.html +0 -19
  339. package/src/core/parse/parse.js +0 -337
  340. package/src/core/parse/parse.md +0 -57
  341. package/src/core/parse/parse.spec.js +0 -2107
  342. package/src/core/parse/parse.test.js +0 -10
  343. package/src/core/parse/parser/parser.html +0 -19
  344. package/src/core/parse/parser/parser.js +0 -64
  345. package/src/core/parse/parser/parser.spec.js +0 -8
  346. package/src/core/parse/parser/parser.test.js +0 -10
  347. package/src/core/prop.spec.js +0 -775
  348. package/src/core/root-element.spec.js +0 -14
  349. package/src/core/sanitize/interface.ts +0 -10
  350. package/src/core/sanitize/sanitize-uri.js +0 -75
  351. package/src/core/sanitize/sanitize-uri.spec.js +0 -249
  352. package/src/core/sanitize/sanitize-uri.test.js +0 -12
  353. package/src/core/sanitize/sanitize.html +0 -22
  354. package/src/core/scope/scope.html +0 -19
  355. package/src/core/scope/scope.js +0 -1249
  356. package/src/core/scope/scope.spec.js +0 -3000
  357. package/src/core/scope/scope.test.js +0 -12
  358. package/src/directive/aria/aria.html +0 -19
  359. package/src/directive/aria/aria.js +0 -382
  360. package/src/directive/aria/aria.md +0 -145
  361. package/src/directive/aria/aria.spec.js +0 -1241
  362. package/src/directive/aria/aria.test.js +0 -12
  363. package/src/directive/attrs/attrs.html +0 -19
  364. package/src/directive/attrs/attrs.js +0 -106
  365. package/src/directive/attrs/attrs.md +0 -224
  366. package/src/directive/attrs/attrs.spec.js +0 -71
  367. package/src/directive/attrs/attrs.test.js +0 -12
  368. package/src/directive/attrs/boolean.html +0 -19
  369. package/src/directive/attrs/boolean.spec.js +0 -137
  370. package/src/directive/attrs/boolean.test.js +0 -12
  371. package/src/directive/attrs/element-style.html +0 -22
  372. package/src/directive/attrs/element-style.spec.js +0 -85
  373. package/src/directive/attrs/element-style.test.js +0 -12
  374. package/src/directive/attrs/src.html +0 -19
  375. package/src/directive/attrs/src.spec.js +0 -163
  376. package/src/directive/attrs/src.test.js +0 -12
  377. package/src/directive/bind/bind-html.spec.js +0 -36
  378. package/src/directive/bind/bind.html +0 -20
  379. package/src/directive/bind/bind.js +0 -78
  380. package/src/directive/bind/bind.md +0 -142
  381. package/src/directive/bind/bind.spec.js +0 -314
  382. package/src/directive/bind/bind.test.js +0 -12
  383. package/src/directive/channel/channel.html +0 -19
  384. package/src/directive/channel/channel.js +0 -30
  385. package/src/directive/channel/channel.spec.js +0 -67
  386. package/src/directive/channel/channel.test.js +0 -10
  387. package/src/directive/class/class-test.html +0 -23
  388. package/src/directive/class/class.html +0 -19
  389. package/src/directive/class/class.js +0 -184
  390. package/src/directive/class/class.spec.js +0 -704
  391. package/src/directive/class/class.test.js +0 -12
  392. package/src/directive/cloak/cloak.html +0 -19
  393. package/src/directive/cloak/cloak.js +0 -11
  394. package/src/directive/cloak/cloak.spec.js +0 -44
  395. package/src/directive/cloak/cloak.test.js +0 -12
  396. package/src/directive/controller/controller.html +0 -22
  397. package/src/directive/controller/controller.js +0 -11
  398. package/src/directive/controller/controller.md +0 -46
  399. package/src/directive/controller/controller.spec.js +0 -175
  400. package/src/directive/controller/controller.test.js +0 -12
  401. package/src/directive/events/click.spec.js +0 -35
  402. package/src/directive/events/event.spec.js +0 -267
  403. package/src/directive/events/events-test.html +0 -36
  404. package/src/directive/events/events.html +0 -20
  405. package/src/directive/events/events.js +0 -65
  406. package/src/directive/events/events.md +0 -125
  407. package/src/directive/events/events.test.js +0 -12
  408. package/src/directive/form/form.html +0 -19
  409. package/src/directive/form/form.js +0 -669
  410. package/src/directive/form/form.spec.js +0 -1515
  411. package/src/directive/form/form.test.js +0 -12
  412. package/src/directive/http/delete.spec.js +0 -26
  413. package/src/directive/http/form-router-test.html +0 -44
  414. package/src/directive/http/form-test.html +0 -18
  415. package/src/directive/http/get.spec.js +0 -488
  416. package/src/directive/http/http.html +0 -22
  417. package/src/directive/http/http.js +0 -342
  418. package/src/directive/http/http.test.js +0 -12
  419. package/src/directive/http/post-example.html +0 -30
  420. package/src/directive/http/post.spec.js +0 -521
  421. package/src/directive/http/put.spec.js +0 -26
  422. package/src/directive/if/if-animate-css.html +0 -57
  423. package/src/directive/if/if-animate-svg.html +0 -25
  424. package/src/directive/if/if.html +0 -19
  425. package/src/directive/if/if.js +0 -72
  426. package/src/directive/if/if.md +0 -76
  427. package/src/directive/if/if.spec.js +0 -293
  428. package/src/directive/if/if.test.js +0 -114
  429. package/src/directive/include/include.html +0 -19
  430. package/src/directive/include/include.js +0 -151
  431. package/src/directive/include/include.md +0 -87
  432. package/src/directive/include/include.spec.js +0 -734
  433. package/src/directive/include/include.test.js +0 -12
  434. package/src/directive/init/init.html +0 -19
  435. package/src/directive/init/init.js +0 -22
  436. package/src/directive/init/init.md +0 -41
  437. package/src/directive/init/init.spec.js +0 -68
  438. package/src/directive/init/init.test.js +0 -12
  439. package/src/directive/input/input-example.html +0 -15
  440. package/src/directive/input/input.html +0 -19
  441. package/src/directive/input/input.js +0 -1078
  442. package/src/directive/input/input.md +0 -706
  443. package/src/directive/input/input.spec.js +0 -3700
  444. package/src/directive/input/input.test.js +0 -12
  445. package/src/directive/messages/messages.html +0 -22
  446. package/src/directive/messages/messages.js +0 -349
  447. package/src/directive/messages/messages.md +0 -543
  448. package/src/directive/messages/messages.spec.js +0 -1083
  449. package/src/directive/messages/messages.test.js +0 -12
  450. package/src/directive/model/change.md +0 -25
  451. package/src/directive/model/model.html +0 -19
  452. package/src/directive/model/model.js +0 -1170
  453. package/src/directive/model/model.spec.js +0 -1976
  454. package/src/directive/model/model.test.js +0 -12
  455. package/src/directive/model-options/model-option.test.js +0 -12
  456. package/src/directive/model-options/model-options.html +0 -22
  457. package/src/directive/model-options/model-options.js +0 -142
  458. package/src/directive/model-options/model-options.md +0 -407
  459. package/src/directive/model-options/model-options.spec.js +0 -1022
  460. package/src/directive/non-bindable/non-bindable.html +0 -22
  461. package/src/directive/non-bindable/non-bindable.js +0 -9
  462. package/src/directive/non-bindable/non-bindable.spec.js +0 -59
  463. package/src/directive/non-bindable/non-bindable.test.js +0 -12
  464. package/src/directive/observe/observe-demo.html +0 -184
  465. package/src/directive/observe/observe.html +0 -19
  466. package/src/directive/observe/observe.js +0 -41
  467. package/src/directive/observe/observe.spec.js +0 -106
  468. package/src/directive/observe/observe.test.js +0 -10
  469. package/src/directive/on/on.html +0 -19
  470. package/src/directive/on/on.spec.js +0 -215
  471. package/src/directive/on/on.test.js +0 -12
  472. package/src/directive/options/options-example.html +0 -17
  473. package/src/directive/options/options.html +0 -22
  474. package/src/directive/options/options.js +0 -542
  475. package/src/directive/options/options.md +0 -179
  476. package/src/directive/options/options.spec.js +0 -3554
  477. package/src/directive/options/options.test.js +0 -12
  478. package/src/directive/ref/href.html +0 -19
  479. package/src/directive/ref/href.spec.js +0 -141
  480. package/src/directive/ref/href.test.js +0 -19
  481. package/src/directive/ref/ref.html +0 -19
  482. package/src/directive/ref/ref.js +0 -89
  483. package/src/directive/ref/ref.spec.js +0 -546
  484. package/src/directive/repeat/repeat.html +0 -19
  485. package/src/directive/repeat/repeat.js +0 -333
  486. package/src/directive/repeat/repeat.md +0 -330
  487. package/src/directive/repeat/repeat.spec.js +0 -1209
  488. package/src/directive/repeat/repeat.test.js +0 -12
  489. package/src/directive/script/script.html +0 -19
  490. package/src/directive/script/script.js +0 -17
  491. package/src/directive/script/script.md +0 -11
  492. package/src/directive/script/script.spec.js +0 -47
  493. package/src/directive/script/script.test.js +0 -12
  494. package/src/directive/select/select.html +0 -19
  495. package/src/directive/select/select.js +0 -594
  496. package/src/directive/select/select.md +0 -74
  497. package/src/directive/select/select.spec.js +0 -2566
  498. package/src/directive/select/select.test.js +0 -12
  499. package/src/directive/setter/setter.html +0 -19
  500. package/src/directive/setter/setter.js +0 -59
  501. package/src/directive/setter/setter.spec.js +0 -100
  502. package/src/directive/setter/setter.test.js +0 -12
  503. package/src/directive/show-hide/show-hide.html +0 -22
  504. package/src/directive/show-hide/show-hide.js +0 -65
  505. package/src/directive/show-hide/show-hide.md +0 -255
  506. package/src/directive/show-hide/show-hide.spec.js +0 -268
  507. package/src/directive/show-hide/show-hide.test.js +0 -12
  508. package/src/directive/style/style.html +0 -19
  509. package/src/directive/style/style.js +0 -27
  510. package/src/directive/style/style.md +0 -23
  511. package/src/directive/style/style.spec.js +0 -183
  512. package/src/directive/style/style.test.js +0 -12
  513. package/src/directive/switch/switch.html +0 -19
  514. package/src/directive/switch/switch.js +0 -133
  515. package/src/directive/switch/switch.md +0 -66
  516. package/src/directive/switch/switch.spec.js +0 -509
  517. package/src/directive/switch/switch.test.js +0 -12
  518. package/src/directive/transclude/transclude.js +0 -122
  519. package/src/directive/validators/validators.html +0 -22
  520. package/src/directive/validators/validators.js +0 -346
  521. package/src/directive/validators/validators.spec.js +0 -740
  522. package/src/directive/validators/validators.test.js +0 -12
  523. package/src/filters/filter.js +0 -213
  524. package/src/filters/filter.md +0 -69
  525. package/src/filters/filter.spec.js +0 -719
  526. package/src/filters/filters.html +0 -22
  527. package/src/filters/filters.js +0 -239
  528. package/src/filters/filters.spec.js +0 -36
  529. package/src/filters/filters.test.js +0 -12
  530. package/src/filters/json.md +0 -16
  531. package/src/filters/limit-to.js +0 -55
  532. package/src/filters/limit-to.md +0 -19
  533. package/src/filters/limit-to.spec.js +0 -252
  534. package/src/filters/order-by.js +0 -181
  535. package/src/filters/order-by.md +0 -83
  536. package/src/filters/order-by.spec.js +0 -883
  537. package/src/index.js +0 -6
  538. package/src/index.spec.js +0 -11
  539. package/src/injection-tokens.js +0 -78
  540. package/src/interface.ts +0 -421
  541. package/src/ng.js +0 -289
  542. package/src/ng.spec.js +0 -33
  543. package/src/router/common/trace.js +0 -240
  544. package/src/router/directives/component-example.html +0 -37
  545. package/src/router/directives/state-directives.html +0 -22
  546. package/src/router/directives/state-directives.js +0 -393
  547. package/src/router/directives/state-directives.md +0 -435
  548. package/src/router/directives/state-directives.spec.js +0 -1091
  549. package/src/router/directives/state-directives.test.js +0 -10
  550. package/src/router/directives/view-directive.js +0 -489
  551. package/src/router/directives/view-directive.spec.js +0 -1937
  552. package/src/router/directives/view-directive.test.js +0 -10
  553. package/src/router/directives/view-directives.html +0 -22
  554. package/src/router/glob/glob.html +0 -19
  555. package/src/router/glob/glob.js +0 -102
  556. package/src/router/glob/glob.spec.js +0 -108
  557. package/src/router/glob/glob.test.js +0 -12
  558. package/src/router/hooks/core-resolvables.js +0 -38
  559. package/src/router/hooks/ignored-transition.js +0 -25
  560. package/src/router/hooks/invalid-transition.js +0 -14
  561. package/src/router/hooks/lazy-load.js +0 -104
  562. package/src/router/hooks/on-enter-exit-retain.js +0 -55
  563. package/src/router/hooks/redirect-to.js +0 -38
  564. package/src/router/hooks/resolve.js +0 -57
  565. package/src/router/hooks/update-globals.js +0 -34
  566. package/src/router/hooks/url.js +0 -34
  567. package/src/router/hooks/views.js +0 -41
  568. package/src/router/params/interface.ts +0 -626
  569. package/src/router/params/param-factory.js +0 -23
  570. package/src/router/params/param-type.js +0 -133
  571. package/src/router/params/param-types.js +0 -153
  572. package/src/router/params/param.js +0 -243
  573. package/src/router/params/state-params.js +0 -36
  574. package/src/router/path/path-node.js +0 -78
  575. package/src/router/path/path-utils.js +0 -207
  576. package/src/router/resolve/interface.ts +0 -208
  577. package/src/router/resolve/resolvable.js +0 -123
  578. package/src/router/resolve/resolve-context.js +0 -190
  579. package/src/router/router-test-hashbang.html +0 -45
  580. package/src/router/router-test.html +0 -41
  581. package/src/router/router.html +0 -22
  582. package/src/router/router.js +0 -54
  583. package/src/router/router.test.js +0 -12
  584. package/src/router/services.spec.js +0 -52
  585. package/src/router/state/README.md +0 -21
  586. package/src/router/state/interface.ts +0 -1007
  587. package/src/router/state/state-builder.js +0 -376
  588. package/src/router/state/state-builder.spec.js +0 -86
  589. package/src/router/state/state-matcher.js +0 -64
  590. package/src/router/state/state-object.js +0 -118
  591. package/src/router/state/state-queue-manager.js +0 -95
  592. package/src/router/state/state-registry.js +0 -257
  593. package/src/router/state/state-service.js +0 -699
  594. package/src/router/state/state.html +0 -23
  595. package/src/router/state/state.spec.js +0 -1002
  596. package/src/router/state/state.test.js +0 -12
  597. package/src/router/state/target-state.js +0 -162
  598. package/src/router/state/views.js +0 -195
  599. package/src/router/state-filter.spec.js +0 -139
  600. package/src/router/state-filters.js +0 -46
  601. package/src/router/template-factory.html +0 -19
  602. package/src/router/template-factory.js +0 -249
  603. package/src/router/template-factory.spec.js +0 -155
  604. package/src/router/template-factory.test.js +0 -12
  605. package/src/router/transition/hook-builder.js +0 -133
  606. package/src/router/transition/hook-registry.js +0 -172
  607. package/src/router/transition/interface.js +0 -18
  608. package/src/router/transition/interface.ts +0 -922
  609. package/src/router/transition/reject-factory.js +0 -122
  610. package/src/router/transition/transition-event-type.js +0 -26
  611. package/src/router/transition/transition-hook.js +0 -199
  612. package/src/router/transition/transition-service.js +0 -302
  613. package/src/router/transition/transition.js +0 -652
  614. package/src/router/url/url-config.js +0 -155
  615. package/src/router/url/url-matcher.js +0 -532
  616. package/src/router/url/url-rule.js +0 -231
  617. package/src/router/url/url-rules.js +0 -350
  618. package/src/router/url/url-service.js +0 -446
  619. package/src/router/url/url-service.spec.js +0 -1288
  620. package/src/router/url/url.html +0 -19
  621. package/src/router/url/url.test.js +0 -12
  622. package/src/router/view/interface.ts +0 -51
  623. package/src/router/view/view.html +0 -19
  624. package/src/router/view/view.js +0 -274
  625. package/src/router/view/view.spec.js +0 -100
  626. package/src/router/view/view.test.js +0 -12
  627. package/src/router/view-hook.spec.js +0 -215
  628. package/src/router/view-scroll.js +0 -33
  629. package/src/router/view-scroll.spec.js +0 -72
  630. package/src/services/anchor-scroll.html +0 -76
  631. package/src/services/anchor-scroll.js +0 -147
  632. package/src/services/cookie-reader.js +0 -48
  633. package/src/services/exception/exception-handler.js +0 -75
  634. package/src/services/exception/interface.ts +0 -7
  635. package/src/services/http/http.html +0 -23
  636. package/src/services/http/http.js +0 -922
  637. package/src/services/http/http.md +0 -413
  638. package/src/services/http/http.spec.js +0 -3941
  639. package/src/services/http/http.test.js +0 -11
  640. package/src/services/http/interface.ts +0 -243
  641. package/src/services/http/template-request.spec.js +0 -220
  642. package/src/services/http-backend/http-backend.html +0 -22
  643. package/src/services/http-backend/http-backend.js +0 -158
  644. package/src/services/http-backend/http-backend.spec.js +0 -389
  645. package/src/services/http-backend/http-backend.test.js +0 -12
  646. package/src/services/location/interface.ts +0 -70
  647. package/src/services/location/location.html +0 -22
  648. package/src/services/location/location.js +0 -1006
  649. package/src/services/location/location.spec.js +0 -3792
  650. package/src/services/location/location.test.js +0 -12
  651. package/src/services/log/interface.ts +0 -39
  652. package/src/services/log/log.html +0 -19
  653. package/src/services/log/log.js +0 -74
  654. package/src/services/log/log.spec.js +0 -64
  655. package/src/services/log/log.test.js +0 -12
  656. package/src/services/pubsub/pubsub.html +0 -19
  657. package/src/services/pubsub/pubsub.js +0 -349
  658. package/src/services/pubsub/pubsub.spec.js +0 -400
  659. package/src/services/pubsub/pubsub.test.js +0 -12
  660. package/src/services/sce/sce.html +0 -19
  661. package/src/services/sce/sce.js +0 -847
  662. package/src/services/sce/sce.md +0 -300
  663. package/src/services/sce/sce.spec.js +0 -617
  664. package/src/services/sce/sce.test.js +0 -12
  665. package/src/services/template-cache/interface.ts +0 -10
  666. package/src/services/template-cache/template-cache.html +0 -22
  667. package/src/services/template-cache/template-cache.js +0 -15
  668. package/src/services/template-cache/template-cache.spec.js +0 -134
  669. package/src/services/template-cache/template-cache.test.js +0 -12
  670. package/src/services/template-request.js +0 -142
  671. package/src/shared/cache.js +0 -7
  672. package/src/shared/common.js +0 -438
  673. package/src/shared/common.spec.js +0 -294
  674. package/src/shared/constants.js +0 -21
  675. package/src/shared/dom.js +0 -716
  676. package/src/shared/hof.js +0 -151
  677. package/src/shared/hof.spec.js +0 -60
  678. package/src/shared/interface.ts +0 -21
  679. package/src/shared/min-err.spec.js +0 -178
  680. package/src/shared/noderef.js +0 -225
  681. package/src/shared/predicates.js +0 -34
  682. package/src/shared/queue.js +0 -105
  683. package/src/shared/queue.spec.js +0 -80
  684. package/src/shared/shared.html +0 -24
  685. package/src/shared/shared.test.js +0 -12
  686. package/src/shared/strings.js +0 -142
  687. package/src/shared/strings.spec.js +0 -40
  688. package/src/shared/test-utils.js +0 -47
  689. package/src/shared/url-utils/interface.ts +0 -54
  690. package/src/shared/url-utils/url-utils.html +0 -22
  691. package/src/shared/url-utils/url-utils.js +0 -122
  692. package/src/shared/url-utils/url-utils.spec.js +0 -148
  693. package/src/shared/url-utils/url-utils.test.js +0 -12
  694. package/src/shared/utils.js +0 -1255
  695. package/src/shared/utils.spec.js +0 -178
  696. package/src/src.html +0 -21
  697. package/src/src.test.js +0 -10
  698. package/tsconfig.json +0 -19
  699. package/tsconfig.types.json +0 -14
  700. package/typedoc.json +0 -8
  701. package/utils/express.js +0 -203
  702. package/utils/version.cjs +0 -23
  703. package/vite.config.js +0 -14
package/legacy.d.ts DELETED
@@ -1,2599 +0,0 @@
1
- declare var angular: angular.IAngularStatic;
2
-
3
- // Support for painless dependency injection
4
- declare global {
5
- interface Function {
6
- $inject?: readonly string[] | undefined;
7
- }
8
- }
9
-
10
- export as namespace angular;
11
- export as namespace ng;
12
-
13
- // Support AMD require
14
- export = angular;
15
-
16
- import ng = angular;
17
-
18
- ///////////////////////////////////////////////////////////////////////////////
19
- // ng module (angular.js)
20
- ///////////////////////////////////////////////////////////////////////////////
21
- declare namespace angular {
22
- type Injectable<T extends Function> = T | Array<string | T>;
23
-
24
- // not directly implemented, but ensures that constructed class implements $get
25
- interface IServiceProviderClass {
26
- new (...args: any[]): IServiceProvider;
27
- }
28
-
29
- interface IServiceProviderFactory {
30
- (...args: any[]): IServiceProvider;
31
- }
32
-
33
- // All service providers extend this interface
34
- interface IServiceProvider {
35
- $get: any;
36
- }
37
-
38
- interface IAngularBootstrapConfig {
39
- strictDi?: boolean | undefined;
40
- }
41
-
42
- ///////////////////////////////////////////////////////////////////////////
43
- // AngularStatic
44
- // see http://docs.angularjs.org/api
45
- ///////////////////////////////////////////////////////////////////////////
46
- interface IAngularStatic {
47
- bind(context: any, fn: Function, ...args: any[]): Function;
48
-
49
- /**
50
- * Use this function to manually start up angular application.
51
- *
52
- * @param element DOM element which is the root of angular application.
53
- * @param modules An array of modules to load into the application.
54
- * Each item in the array should be the name of a predefined module or a (DI annotated)
55
- * function that will be invoked by the injector as a config block.
56
- * @param config an object for defining configuration options for the application. The following keys are supported:
57
- * - `strictDi`: disable automatic function annotation for the application. This is meant to assist in finding bugs which break minified code.
58
- */
59
- bootstrap(
60
- element: string | Element | JQuery | Document,
61
- modules?: Array<string | Function | any[]>,
62
- config?: IAngularBootstrapConfig,
63
- ): auto.IInjectorService;
64
-
65
- /**
66
- * Creates a deep copy of source, which should be an object or an array.
67
- *
68
- * - If no destination is supplied, a copy of the object or array is created.
69
- * - If a destination is provided, all of its elements (for array) or properties (for objects) are deleted and then all elements/properties from the source are copied to it.
70
- * - If source is not an object or array (inc. null and undefined), source is returned.
71
- * - If source is identical to 'destination' an exception will be thrown.
72
- *
73
- * @param source The source that will be used to make a copy. Can be any type, including primitives, null, and undefined.
74
- * @param destination Destination into which the source is copied. If provided, must be of the same type as source.
75
- */
76
- copy<T>(source: T, destination?: T): T;
77
-
78
- /**
79
- * Wraps a raw DOM element or HTML string as a jQuery element.
80
- *
81
- * If jQuery is available, angular.element is an alias for the jQuery function. If jQuery is not available, angular.element delegates to Angular's built-in subset of jQuery, called "jQuery lite" or "jqLite."
82
- */
83
- element: JQueryStatic;
84
- /**
85
- * Configure several aspects of error handling in AngularJS if used as a setter
86
- * or return the current configuration if used as a getter
87
- */
88
- errorHandlingConfig(): IErrorHandlingConfig;
89
- errorHandlingConfig(config: IErrorHandlingConfig): void;
90
- equals(value1: any, value2: any): boolean;
91
- extend(destination: any, ...sources: any[]): any;
92
-
93
- /**
94
- * The angular.module is a global place for creating, registering and retrieving Angular modules. All modules (angular core or 3rd party) that should be available to an application must be registered using this mechanism.
95
- *
96
- * When passed two or more arguments, a new module is created. If passed only one argument, an existing module (the name passed as the first argument to module) is retrieved.
97
- *
98
- * @param name The name of the module to create or retrieve.
99
- * @param requires The names of modules this module depends on. If specified then new module is being created. If unspecified then the module is being retrieved for further configuration.
100
- * @param configFn Optional configuration function for the module.
101
- */
102
- module(
103
- name: string,
104
- requires?: string[],
105
- configFn?: Injectable<Function>,
106
- ): IModule;
107
-
108
- noop(...args: any[]): void;
109
- reloadWithDebugInfo(): void;
110
- toJson(obj: any, pretty?: boolean | number): string;
111
- version: {
112
- full: string;
113
- major: number;
114
- minor: number;
115
- dot: number;
116
- codeName: string;
117
- };
118
-
119
- /**
120
- * If window.name contains prefix NG_DEFER_BOOTSTRAP! when angular.bootstrap is called, the bootstrap process will be paused until angular.resumeBootstrap() is called.
121
- * @param extraModules An optional array of modules that should be added to the original list of modules that the app was about to be bootstrapped with.
122
- */
123
- resumeBootstrap?(extraModules?: string[]): ng.auto.IInjectorService;
124
-
125
- /**
126
- * Restores the pre-1.8 behavior of jqLite that turns XHTML-like strings like
127
- * `<div /><span />` to `<div></div><span></span>` instead of `<div><span></span></div>`.
128
- * The new behavior is a security fix so if you use this method, please try to adjust
129
- * to the change & remove the call as soon as possible.
130
- * Note that this only patches jqLite. If you use jQuery 3.5.0 or newer, please read
131
- * [jQuery 3.5 upgrade guide](https://jquery.com/upgrade-guide/3.5/) for more details
132
- * about the workarounds.
133
- */
134
- UNSAFE_restoreLegacyJqLiteXHTMLReplacement(): void;
135
- }
136
-
137
- ///////////////////////////////////////////////////////////////////////////
138
- // Module
139
- // see http://docs.angularjs.org/api/angular.Module
140
- ///////////////////////////////////////////////////////////////////////////
141
- interface IModule {
142
- /**
143
- * Use this method to register a component.
144
- *
145
- * @param name The name of the component.
146
- * @param options A definition object passed into the component.
147
- */
148
- component(name: string, options: IComponentOptions): IModule;
149
- /**
150
- * Use this method to register a component.
151
- *
152
- * @param object Object map of components where the keys are the names and the values are the component definition objects
153
- */
154
- component(object: { [componentName: string]: IComponentOptions }): IModule;
155
- /**
156
- * Use this method to register work which needs to be performed on module loading.
157
- *
158
- * @param configFn Execute this function on module load. Useful for service configuration.
159
- */
160
- config(configFn: Function): IModule;
161
- /**
162
- * Use this method to register work which needs to be performed on module loading.
163
- *
164
- * @param inlineAnnotatedFunction Execute this function on module load. Useful for service configuration.
165
- */
166
- config(inlineAnnotatedFunction: any[]): IModule;
167
- config(object: Object): IModule;
168
- /**
169
- * Register a constant service, such as a string, a number, an array, an object or a function, with the $injector. Unlike value it can be injected into a module configuration function (see config) and it cannot be overridden by an Angular decorator.
170
- *
171
- * @param name The name of the constant.
172
- * @param value The constant value.
173
- */
174
- constant<T>(name: string, value: T): IModule;
175
- constant(object: Object): IModule;
176
- /**
177
- * The $controller service is used by Angular to create new controllers.
178
- *
179
- * This provider allows controller registration via the register method.
180
- *
181
- * @param name Controller name, or an object map of controllers where the keys are the names and the values are the constructors.
182
- * @param controllerConstructor Controller constructor fn (optionally decorated with DI annotations in the array notation).
183
- */
184
- controller(
185
- name: string,
186
- controllerConstructor: Injectable<IControllerConstructor>,
187
- ): IModule;
188
- controller(object: {
189
- [name: string]: Injectable<IControllerConstructor>;
190
- }): IModule;
191
- /**
192
- * Register a new directive with the compiler.
193
- *
194
- * @param name Name of the directive in camel-case (i.e. ngBind which will match as ng-bind)
195
- * @param directiveFactory An injectable directive factory function.
196
- */
197
- directive<
198
- TScope extends IScope = IScope,
199
- TElement extends JQLite = JQLite,
200
- TAttributes extends IAttributes = IAttributes,
201
- TController extends IDirectiveController = IController,
202
- >(
203
- name: string,
204
- directiveFactory: Injectable<
205
- IDirectiveFactory<TScope, TElement, TAttributes, TController>
206
- >,
207
- ): IModule;
208
- directive<
209
- TScope extends IScope = IScope,
210
- TElement extends JQLite = JQLite,
211
- TAttributes extends IAttributes = IAttributes,
212
- TController extends IDirectiveController = IController,
213
- >(object: {
214
- [directiveName: string]: Injectable<
215
- IDirectiveFactory<TScope, TElement, TAttributes, TController>
216
- >;
217
- }): IModule;
218
-
219
- /**
220
- * Register a service factory, which will be called to return the service instance. This is short for registering a service where its provider consists of only a $get property, which is the given service factory function. You should use $provide.factory(getFn) if you do not need to configure your service in a provider.
221
- *
222
- * @param name The name of the instance.
223
- * @param $getFn The $getFn for the instance creation. Internally this is a short hand for $provide.provider(name, {$get: $getFn}).
224
- */
225
- factory(name: string, $getFn: Injectable<Function>): IModule;
226
- factory(object: { [name: string]: Injectable<Function> }): IModule;
227
- filter(
228
- name: string,
229
- filterFactoryFunction: Injectable<FilterFactory>,
230
- ): IModule;
231
- filter(object: { [name: string]: Injectable<FilterFactory> }): IModule;
232
- provider(
233
- name: string,
234
- serviceProviderFactory: IServiceProviderFactory,
235
- ): IModule;
236
- provider(
237
- name: string,
238
- serviceProviderConstructor: IServiceProviderClass,
239
- ): IModule;
240
- provider(name: string, inlineAnnotatedConstructor: any[]): IModule;
241
- provider(name: string, providerObject: IServiceProvider): IModule;
242
- provider(object: Object): IModule;
243
- /**
244
- * Run blocks are the closest thing in Angular to the main method. A run block is the code which needs to run to kickstart the application. It is executed after all of the service have been configured and the injector has been created. Run blocks typically contain code which is hard to unit-test, and for this reason should be declared in isolated modules, so that they can be ignored in the unit-tests.
245
- */
246
- run(initializationFunction: Injectable<Function>): IModule;
247
- /**
248
- * Register a service constructor, which will be invoked with new to create the service instance. This is short for registering a service where its provider's $get property is a factory function that returns an instance instantiated by the injector from the service constructor function.
249
- *
250
- * @param name The name of the instance.
251
- * @param serviceConstructor An injectable class (constructor function) that will be instantiated.
252
- */
253
- service(name: string, serviceConstructor: Injectable<Function>): IModule;
254
- service(object: { [name: string]: Injectable<Function> }): IModule;
255
- /**
256
- * Register a value service with the $injector, such as a string, a number, an array, an object or a function. This is short for registering a service where its provider's $get property is a factory function that takes no arguments and returns the value service.
257
-
258
- Value services are similar to constant services, except that they cannot be injected into a module configuration function (see config) but they can be overridden by an Angular decorator.
259
- *
260
- * @param name The name of the instance.
261
- * @param value The value.
262
- */
263
- value<T>(name: string, value: T): IModule;
264
- value(object: Object): IModule;
265
-
266
- /**
267
- * Register a service decorator with the $injector. A service decorator intercepts the creation of a service, allowing it to override or modify the behaviour of the service. The object returned by the decorator may be the original service, or a new service object which replaces or wraps and delegates to the original service.
268
- * @param name The name of the service to decorate
269
- * @param decorator This function will be invoked when the service needs to be instantiated and should return the decorated service instance. The function is called using the injector.invoke method and is therefore fully injectable. Local injection arguments: $delegate - The original service instance, which can be monkey patched, configured, decorated or delegated to.
270
- */
271
- decorator(name: string, decorator: Injectable<Function>): IModule;
272
-
273
- // Properties
274
- name: string;
275
- requires: string[];
276
- }
277
-
278
- ///////////////////////////////////////////////////////////////////////////
279
- // Attributes
280
- // see http://docs.angularjs.org/api/ng/type/$compile.directive.Attributes
281
- ///////////////////////////////////////////////////////////////////////////
282
- interface IAttributes {
283
- /**
284
- * this is necessary to be able to access the scoped attributes. it's not very elegant
285
- * because you have to use attrs['foo'] instead of attrs.foo but I don't know of a better way
286
- * this should really be limited to return string but it creates this problem: http://stackoverflow.com/q/17201854/165656
287
- */
288
- [name: string]: any;
289
-
290
- /**
291
- * Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with x- or data-) to its normalized, camelCase form.
292
- *
293
- * Also there is special case for Moz prefix starting with upper case letter.
294
- *
295
- * For further information check out the guide on @see https://docs.angularjs.org/guide/directive#matching-directives
296
- */
297
- $normalize(name: string): string;
298
-
299
- /**
300
- * Adds the CSS class value specified by the classVal parameter to the
301
- * element. If animations are enabled then an animation will be triggered
302
- * for the class addition.
303
- */
304
- $addClass(classVal: string): void;
305
-
306
- /**
307
- * Removes the CSS class value specified by the classVal parameter from the
308
- * element. If animations are enabled then an animation will be triggered for
309
- * the class removal.
310
- */
311
- $removeClass(classVal: string): void;
312
-
313
- /**
314
- * Adds and removes the appropriate CSS class values to the element based on the difference between
315
- * the new and old CSS class values (specified as newClasses and oldClasses).
316
- */
317
- $updateClass(newClasses: string, oldClasses: string): void;
318
-
319
- /**
320
- * Set DOM element attribute value.
321
- */
322
- $set(key: string, value: any): void;
323
-
324
- /**
325
- * Observes an interpolated attribute.
326
- * The observer function will be invoked once during the next $digest
327
- * following compilation. The observer is then invoked whenever the
328
- * interpolated value changes.
329
- */
330
- $observe<T>(name: string, fn: (value?: T) => any): Function;
331
-
332
- /**
333
- * A map of DOM element attribute names to the normalized name. This is needed
334
- * to do reverse lookup from normalized name back to actual name.
335
- */
336
- $attr: Object;
337
- }
338
-
339
- /**
340
- * form.FormController - type in module ng
341
- * see https://docs.angularjs.org/api/ng/type/form.FormController
342
- */
343
- interface IFormController {
344
- /**
345
- * Indexer which should return ng.INgModelController for most properties but cannot because of "All named properties must be assignable to string indexer type" constraint - see https://github.com/Microsoft/TypeScript/issues/272
346
- */
347
- [name: string]: any;
348
-
349
- $pristine: boolean;
350
- $dirty: boolean;
351
- $valid: boolean;
352
- $invalid: boolean;
353
- $submitted: boolean;
354
- $error: {
355
- [validationErrorKey: string]: Array<INgModelController | IFormController>;
356
- };
357
- $name?: string | undefined;
358
- $pending?:
359
- | {
360
- [validationErrorKey: string]: Array<
361
- INgModelController | IFormController
362
- >;
363
- }
364
- | undefined;
365
- $addControl(control: INgModelController | IFormController): void;
366
- $getControls(): ReadonlyArray<INgModelController | IFormController>;
367
- $removeControl(control: INgModelController | IFormController): void;
368
- $setValidity(
369
- validationErrorKey: string,
370
- isValid: boolean,
371
- control: INgModelController | IFormController,
372
- ): void;
373
- $setDirty(): void;
374
- $setPristine(): void;
375
- $commitViewValue(): void;
376
- $rollbackViewValue(): void;
377
- $setSubmitted(): void;
378
- $setUntouched(): void;
379
- }
380
-
381
- ///////////////////////////////////////////////////////////////////////////
382
- // NgModelController
383
- // see http://docs.angularjs.org/api/ng/type/ngModel.NgModelController
384
- ///////////////////////////////////////////////////////////////////////////
385
- interface INgModelController {
386
- $render(): void;
387
- $setValidity(validationErrorKey: string, isValid: boolean): void;
388
- // Documentation states viewValue and modelValue to be a string but other
389
- // types do work and it's common to use them.
390
- $setViewValue(value: any, trigger?: string): void;
391
- $setPristine(): void;
392
- $setDirty(): void;
393
- $validate(): void;
394
- $setTouched(): void;
395
- $setUntouched(): void;
396
- $rollbackViewValue(): void;
397
- $commitViewValue(): void;
398
- $processModelValue(): void;
399
- $isEmpty(value: any): boolean;
400
- $overrideModelOptions(options: INgModelOptions): void;
401
-
402
- $viewValue: any;
403
-
404
- $modelValue: any;
405
-
406
- $parsers: IModelParser[];
407
- $formatters: IModelFormatter[];
408
- $viewChangeListeners: IModelViewChangeListener[];
409
- $error: { [validationErrorKey: string]: boolean };
410
- $name?: string | undefined;
411
-
412
- $touched: boolean;
413
- $untouched: boolean;
414
-
415
- $validators: IModelValidators;
416
- $asyncValidators: IAsyncModelValidators;
417
-
418
- $pending?: { [validationErrorKey: string]: boolean } | undefined;
419
- $pristine: boolean;
420
- $dirty: boolean;
421
- $valid: boolean;
422
- $invalid: boolean;
423
- }
424
-
425
- // Allows tuning how model updates are done.
426
- // https://docs.angularjs.org/api/ng/directive/ngModelOptions
427
- interface INgModelOptions {
428
- updateOn?: string | undefined;
429
- debounce?: number | { [key: string]: number } | undefined;
430
- allowInvalid?: boolean | undefined;
431
- getterSetter?: boolean | undefined;
432
- timezone?: string | undefined;
433
- /**
434
- * Defines if the time and datetime-local types should show seconds and milliseconds.
435
- * The option follows the format string of date filter.
436
- * By default, the options is undefined which is equal to 'ss.sss' (seconds and milliseconds)
437
- */
438
- timeSecondsFormat?: string | undefined;
439
- /**
440
- * Defines if the time and datetime-local types should strip the seconds and milliseconds
441
- * from the formatted value if they are zero. This option is applied after `timeSecondsFormat`
442
- */
443
- timeStripZeroSeconds?: boolean | undefined;
444
- }
445
-
446
- interface IModelValidators {
447
- /**
448
- * viewValue is any because it can be an object that is called in the view like $viewValue.name:$viewValue.subName
449
- */
450
- [index: string]: (modelValue: any, viewValue: any) => boolean;
451
- }
452
-
453
- interface IAsyncModelValidators {
454
- [index: string]: (modelValue: any, viewValue: any) => IPromise<any>;
455
- }
456
-
457
- interface IModelParser {
458
- (value: any): any;
459
- }
460
-
461
- interface IModelFormatter {
462
- (value: any): any;
463
- }
464
-
465
- interface IModelViewChangeListener {
466
- (): void;
467
- }
468
-
469
- /**
470
- * $rootScope - $rootScopeProvider - service in module ng
471
- * see https://docs.angularjs.org/api/ng/type/$rootScope.Scope and https://docs.angularjs.org/api/ng/service/$rootScope
472
- */
473
- interface IRootScopeService {
474
- $apply(): any;
475
- $apply(exp: string): any;
476
- $apply(exp: (scope: IScope) => any): any;
477
-
478
- $applyAsync(): any;
479
- $applyAsync(exp: string): any;
480
- $applyAsync(exp: (scope: IScope) => any): any;
481
-
482
- /**
483
- * Dispatches an event name downwards to all child scopes (and their children) notifying the registered $rootScope.Scope listeners.
484
- *
485
- * The event life cycle starts at the scope on which $broadcast was called. All listeners listening for name event on this scope get notified. Afterwards, the event propagates to all direct and indirect scopes of the current scope and calls all registered listeners along the way. The event cannot be canceled.
486
- *
487
- * Any exception emitted from the listeners will be passed onto the $exceptionHandler service.
488
- *
489
- * @param name Event name to broadcast.
490
- * @param args Optional one or more arguments which will be passed onto the event listeners.
491
- */
492
- $broadcast(name: string, ...args: any[]): IAngularEvent;
493
- $destroy(): void;
494
- $digest(): void;
495
-
496
- /**
497
- * Suspend watchers of this scope subtree so that they will not be invoked during digest.
498
- *
499
- * This can be used to optimize your application when you know that running those watchers
500
- * is redundant.
501
- *
502
- * **Warning**
503
- *
504
- * Suspending scopes from the digest cycle can have unwanted and difficult to debug results.
505
- * Only use this approach if you are confident that you know what you are doing and have
506
- * ample tests to ensure that bindings get updated as you expect.
507
- *
508
- * Some of the things to consider are:
509
- *
510
- * * Any external event on a directive/component will not trigger a digest while the hosting
511
- * scope is suspended - even if the event handler calls `$apply()` or `$rootScope.$digest()`.
512
- * * Transcluded content exists on a scope that inherits from outside a directive but exists
513
- * as a child of the directive's containing scope. If the containing scope is suspended the
514
- * transcluded scope will also be suspended, even if the scope from which the transcluded
515
- * scope inherits is not suspended.
516
- * * Multiple directives trying to manage the suspended status of a scope can confuse each other:
517
- * * A call to `$suspend()` on an already suspended scope is a no-op.
518
- * * A call to `$resume()` on a non-suspended scope is a no-op.
519
- * * If two directives suspend a scope, then one of them resumes the scope, the scope will no
520
- * longer be suspended. This could result in the other directive believing a scope to be
521
- * suspended when it is not.
522
- * * If a parent scope is suspended then all its descendants will be also excluded from future
523
- * digests whether or not they have been suspended themselves. Note that this also applies to
524
- * isolate child scopes.
525
- * * Calling `$digest()` directly on a descendant of a suspended scope will still run the watchers
526
- * for that scope and its descendants. When digesting we only check whether the current scope is
527
- * locally suspended, rather than checking whether it has a suspended ancestor.
528
- * * Calling `$resume()` on a scope that has a suspended ancestor will not cause the scope to be
529
- * included in future digests until all its ancestors have been resumed.
530
- * * Resolved promises, e.g. from explicit `$q` deferreds and `$http` calls, trigger `$apply()`
531
- * against the `$rootScope` and so will still trigger a global digest even if the promise was
532
- * initiated by a component that lives on a suspended scope.
533
- */
534
- $suspend(): void;
535
-
536
- /**
537
- * Call this method to determine if this scope has been explicitly suspended. It will not
538
- * tell you whether an ancestor has been suspended.
539
- * To determine if this scope will be excluded from a digest triggered at the $rootScope,
540
- * for example, you must check all its ancestors:
541
- *
542
- * ```
543
- * function isExcludedFromDigest(scope) {
544
- * while(scope) {
545
- * if (scope.$isSuspended()) return true;
546
- * scope = scope.$parent;
547
- * }
548
- * return false;
549
- * ```
550
- *
551
- * Be aware that a scope may not be included in digests if it has a suspended ancestor,
552
- * even if `$isSuspended()` returns false.
553
- *
554
- * @returns true if the current scope has been suspended.
555
- */
556
- $isSuspended(): boolean;
557
-
558
- /**
559
- * Resume watchers of this scope subtree in case it was suspended.
560
- *
561
- * See {$rootScope.Scope#$suspend} for information about the dangers of using this approach.
562
- */
563
- $resume(): void;
564
-
565
- /**
566
- * Dispatches an event name upwards through the scope hierarchy notifying the registered $rootScope.Scope listeners.
567
- *
568
- * The event life cycle starts at the scope on which $emit was called. All listeners listening for name event on this scope get notified. Afterwards, the event traverses upwards toward the root scope and calls all registered listeners along the way. The event will stop propagating if one of the listeners cancels it.
569
- *
570
- * Any exception emitted from the listeners will be passed onto the $exceptionHandler service.
571
- *
572
- * @param name Event name to emit.
573
- * @param args Optional one or more arguments which will be passed onto the event listeners.
574
- */
575
- $emit(name: string, ...args: any[]): IAngularEvent;
576
-
577
- $eval(): any;
578
- $eval(expression: string, locals?: Object): any;
579
- $eval(expression: (scope: IScope) => any, locals?: Object): any;
580
-
581
- // Defaults to false by the implementation checking strategy
582
- $new(isolate?: boolean, parent?: IScope): IScope;
583
-
584
- /**
585
- * Listens on events of a given type. See $emit for discussion of event life cycle.
586
- *
587
- * The event listener function format is: function(event, args...).
588
- *
589
- * @param name Event name to listen on.
590
- * @param listener Function to call when the event is emitted.
591
- */
592
- $on(
593
- name: string,
594
- listener: (event: IAngularEvent, ...args: any[]) => any,
595
- ): () => void;
596
-
597
- $watch(
598
- watchExpression: string,
599
- listener?: string,
600
- objectEquality?: boolean,
601
- ): () => void;
602
- $watch<T>(
603
- watchExpression: string,
604
- listener?: (newValue: T, oldValue: T, scope: IScope) => any,
605
- objectEquality?: boolean,
606
- ): () => void;
607
- $watch(
608
- watchExpression: (scope: IScope) => any,
609
- listener?: string,
610
- objectEquality?: boolean,
611
- ): () => void;
612
- $watch<T>(
613
- watchExpression: (scope: IScope) => T,
614
- listener?: (newValue: T, oldValue: T, scope: IScope) => any,
615
- objectEquality?: boolean,
616
- ): () => void;
617
-
618
- $watchCollection<T>(
619
- watchExpression: string,
620
- listener: (newValue: T, oldValue: T, scope: IScope) => any,
621
- ): () => void;
622
- $watchCollection<T>(
623
- watchExpression: (scope: IScope) => T,
624
- listener: (newValue: T, oldValue: T, scope: IScope) => any,
625
- ): () => void;
626
-
627
- $watchGroup(
628
- watchExpressions: any[],
629
- listener: (newValue: any, oldValue: any, scope: IScope) => any,
630
- ): () => void;
631
- $watchGroup(
632
- watchExpressions: Array<{ (scope: IScope): any }>,
633
- listener: (newValue: any, oldValue: any, scope: IScope) => any,
634
- ): () => void;
635
-
636
- $parent: IScope;
637
- $root: IRootScopeService;
638
- $id: number;
639
-
640
- // Hidden members
641
- $$isolateBindings: any;
642
- $$phase: any;
643
- }
644
-
645
- interface IScope extends IRootScopeService {}
646
-
647
- /**
648
- * $scope for ngRepeat directive.
649
- * see https://docs.angularjs.org/api/ng/directive/ngRepeat
650
- */
651
- interface IRepeatScope extends IScope {
652
- /**
653
- * iterator offset of the repeated element (0..length-1).
654
- */
655
- $index: number;
656
-
657
- /**
658
- * true if the repeated element is first in the iterator.
659
- */
660
- $first: boolean;
661
-
662
- /**
663
- * true if the repeated element is between the first and last in the iterator.
664
- */
665
- $middle: boolean;
666
-
667
- /**
668
- * true if the repeated element is last in the iterator.
669
- */
670
- $last: boolean;
671
-
672
- /**
673
- * true if the iterator position $index is even (otherwise false).
674
- */
675
- $even: boolean;
676
-
677
- /**
678
- * true if the iterator position $index is odd (otherwise false).
679
- */
680
- $odd: boolean;
681
- }
682
-
683
- interface IAngularEvent {
684
- /**
685
- * the scope on which the event was $emit-ed or $broadcast-ed.
686
- */
687
- targetScope: IScope;
688
- /**
689
- * the scope that is currently handling the event. Once the event propagates through the scope hierarchy, this property is set to null.
690
- */
691
- currentScope: IScope;
692
- /**
693
- * name of the event.
694
- */
695
- name: string;
696
- /**
697
- * calling stopPropagation function will cancel further event propagation (available only for events that were $emit-ed).
698
- */
699
- stopPropagation?(): void;
700
- /**
701
- * calling preventDefault sets defaultPrevented flag to true.
702
- */
703
- preventDefault(): void;
704
- /**
705
- * true if preventDefault was called.
706
- */
707
- defaultPrevented: boolean;
708
- }
709
-
710
- ///////////////////////////////////////////////////////////////////////////
711
- // WindowService
712
- // see http://docs.angularjs.org/api/ng/service/$window
713
- ///////////////////////////////////////////////////////////////////////////
714
- interface IWindowService extends Window {
715
- [key: string]: any;
716
- }
717
-
718
- ///////////////////////////////////////////////////////////////////////////
719
- // TimeoutService
720
- // see http://docs.angularjs.org/api/ng/service/$timeout
721
- ///////////////////////////////////////////////////////////////////////////
722
- interface ITimeoutService {
723
- (delay?: number, invokeApply?: boolean): IPromise<void>;
724
- <T>(
725
- fn: (...args: any[]) => T | IPromise<T>,
726
- delay?: number,
727
- invokeApply?: boolean,
728
- ...args: any[]
729
- ): IPromise<T>;
730
- cancel(promise?: IPromise<any>): boolean;
731
- }
732
-
733
- ///////////////////////////////////////////////////////////////////////////
734
- // IntervalService
735
- // see http://docs.angularjs.org/api/ng/service/$interval
736
- ///////////////////////////////////////////////////////////////////////////
737
- interface IIntervalService {
738
- (
739
- func: Function,
740
- delay: number,
741
- count?: number,
742
- invokeApply?: boolean,
743
- ...args: any[]
744
- ): IPromise<any>;
745
- cancel(promise: IPromise<any>): boolean;
746
- }
747
-
748
- /**
749
- * $filter - $filterProvider - service in module ng
750
- *
751
- * Filters are used for formatting data displayed to the user.
752
- *
753
- * see https://docs.angularjs.org/api/ng/service/$filter
754
- */
755
- interface IFilterService {
756
- (name: "filter"): IFilterFilter;
757
- (name: "currency"): IFilterCurrency;
758
- (name: "number"): IFilterNumber;
759
- (name: "date"): IFilterDate;
760
- (name: "json"): IFilterJson;
761
- (name: "lowercase"): IFilterLowercase;
762
- (name: "uppercase"): IFilterUppercase;
763
- (name: "limitTo"): IFilterLimitTo;
764
- (name: "orderBy"): IFilterOrderBy;
765
- /**
766
- * Usage:
767
- * $filter(name);
768
- *
769
- * @param name Name of the filter function to retrieve
770
- */
771
- <T>(name: string): T;
772
- }
773
-
774
- interface IFilterFilter {
775
- <T>(
776
- array: T[],
777
- expression:
778
- | string
779
- | IFilterFilterPatternObject
780
- | IFilterFilterPredicateFunc<T>,
781
- comparator?: IFilterFilterComparatorFunc<T> | boolean,
782
- ): T[];
783
- }
784
-
785
- interface IFilterFilterPatternObject {
786
- [name: string]: any;
787
- }
788
-
789
- interface IFilterFilterPredicateFunc<T> {
790
- (value: T, index: number, array: T[]): boolean;
791
- }
792
-
793
- interface IFilterFilterComparatorFunc<T> {
794
- (actual: T, expected: T): boolean;
795
- }
796
-
797
- interface IFilterOrderByItem {
798
- value: any;
799
- type: string;
800
- index: any;
801
- }
802
-
803
- interface IFilterOrderByComparatorFunc {
804
- (left: IFilterOrderByItem, right: IFilterOrderByItem): -1 | 0 | 1;
805
- }
806
-
807
- interface IFilterCurrency {
808
- /**
809
- * Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default symbol for current locale is used.
810
- * @param amount Input to filter.
811
- * @param symbol Currency symbol or identifier to be displayed.
812
- * @param fractionSize Number of decimal places to round the amount to, defaults to default max fraction size for current locale
813
- * @return Formatted number
814
- */
815
- (amount: number, symbol?: string, fractionSize?: number): string;
816
- }
817
-
818
- interface IFilterNumber {
819
- /**
820
- * Formats a number as text.
821
- * @param number Number to format.
822
- * @param fractionSize Number of decimal places to round the number to. If this is not provided then the fraction size is computed from the current locale's number formatting pattern. In the case of the default locale, it will be 3.
823
- * @return Number rounded to decimalPlaces and places a “,” after each third digit.
824
- */
825
- (value: number | string, fractionSize?: number | string): string;
826
- }
827
-
828
- interface IFilterDate {
829
- /**
830
- * Formats date to a string based on the requested format.
831
- *
832
- * @param date Date to format either as Date object, milliseconds (string or number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is specified in the string input, the time is considered to be in the local timezone.
833
- * @param format Formatting rules (see Description). If not specified, mediumDate is used.
834
- * @param timezone Timezone to be used for formatting. It understands UTC/GMT and the continental US time zone abbreviations, but for general use, use a time zone offset, for example, '+0430' (4 hours, 30 minutes east of the Greenwich meridian) If not specified, the timezone of the browser will be used.
835
- * @return Formatted string or the input if input is not recognized as date/millis.
836
- */
837
- (date: Date | number | string, format?: string, timezone?: string): string;
838
- }
839
-
840
- interface IFilterJson {
841
- /**
842
- * Allows you to convert a JavaScript object into JSON string.
843
- * @param object Any JavaScript object (including arrays and primitive types) to filter.
844
- * @param spacing The number of spaces to use per indentation, defaults to 2.
845
- * @return JSON string.
846
- */
847
- (object: any, spacing?: number): string;
848
- }
849
-
850
- interface IFilterLowercase {
851
- /**
852
- * Converts string to lowercase.
853
- */
854
- (value: string): string;
855
- }
856
-
857
- interface IFilterUppercase {
858
- /**
859
- * Converts string to uppercase.
860
- */
861
- (value: string): string;
862
- }
863
-
864
- interface IFilterLimitTo {
865
- /**
866
- * Creates a new array containing only a specified number of elements. The elements are taken from either the beginning or the end of the source array, string or number, as specified by the value and sign (positive or negative) of limit.
867
- * @param input Source array to be limited.
868
- * @param limit The length of the returned array. If the limit number is positive, limit number of items from the beginning of the source array/string are copied. If the number is negative, limit number of items from the end of the source array are copied. The limit will be trimmed if it exceeds array.length. If limit is undefined, the input will be returned unchanged.
869
- * @param begin Index at which to begin limitation. As a negative index, begin indicates an offset from the end of input. Defaults to 0.
870
- * @return A new sub-array of length limit or less if input array had less than limit elements.
871
- */
872
- <T>(input: T[], limit: string | number, begin?: string | number): T[];
873
- /**
874
- * Creates a new string containing only a specified number of elements. The elements are taken from either the beginning or the end of the source string or number, as specified by the value and sign (positive or negative) of limit. If a number is used as input, it is converted to a string.
875
- * @param input Source string or number to be limited.
876
- * @param limit The length of the returned string. If the limit number is positive, limit number of items from the beginning of the source string are copied. If the number is negative, limit number of items from the end of the source string are copied. The limit will be trimmed if it exceeds input.length. If limit is undefined, the input will be returned unchanged.
877
- * @param begin Index at which to begin limitation. As a negative index, begin indicates an offset from the end of input. Defaults to 0.
878
- * @return A new substring of length limit or less if input had less than limit elements.
879
- */
880
- (
881
- input: string | number,
882
- limit: string | number,
883
- begin?: string | number,
884
- ): string;
885
- }
886
-
887
- interface IFilterOrderBy {
888
- /**
889
- * Orders a specified array by the expression predicate. It is ordered alphabetically for strings and numerically for numbers. Note: if you notice numbers are not being sorted as expected, make sure they are actually being saved as numbers and not strings.
890
- * @param array The array to sort.
891
- * @param expression A predicate to be used by the comparator to determine the order of elements.
892
- * @param reverse Reverse the order of the array.
893
- * @param comparator Function used to determine the relative order of value pairs.
894
- * @return An array containing the items from the specified collection, ordered by a comparator function based on the values computed using the expression predicate.
895
- */
896
- <T>(
897
- array: T[],
898
- expression:
899
- | string
900
- | ((value: T) => any)
901
- | Array<((value: T) => any) | string>,
902
- reverse?: boolean,
903
- comparator?: IFilterOrderByComparatorFunc,
904
- ): T[];
905
- }
906
-
907
- /**
908
- * $filterProvider - $filter - provider in module ng
909
- *
910
- * Filters are just functions which transform input to an output. However filters need to be Dependency Injected. To achieve this a filter definition consists of a factory function which is annotated with dependencies and is responsible for creating a filter function.
911
- *
912
- * see https://docs.angularjs.org/api/ng/provider/$filterProvider
913
- */
914
- interface IFilterProvider extends IServiceProvider {
915
- /**
916
- * register(name);
917
- *
918
- * @param name Name of the filter function, or an object map of filters where the keys are the filter names and the values are the filter factories. Note: Filter names must be valid angular Expressions identifiers, such as uppercase or orderBy. Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace your filters, then you can use capitalization (myappSubsectionFilterx) or underscores (myapp_subsection_filterx).
919
- */
920
- register(name: string | {}): IServiceProvider;
921
- }
922
-
923
- ///////////////////////////////////////////////////////////////////////////
924
- // LocaleService
925
- // see http://docs.angularjs.org/api/ng/service/$locale
926
- ///////////////////////////////////////////////////////////////////////////
927
- interface ILocaleService {
928
- id: string;
929
-
930
- // These are not documented
931
- // Check angular's i18n files for exemples
932
- NUMBER_FORMATS: ILocaleNumberFormatDescriptor;
933
- DATETIME_FORMATS: ILocaleDateTimeFormatDescriptor;
934
- pluralCat(num: any): string;
935
- }
936
-
937
- interface ILocaleNumberFormatDescriptor {
938
- DECIMAL_SEP: string;
939
- GROUP_SEP: string;
940
- PATTERNS: ILocaleNumberPatternDescriptor[];
941
- CURRENCY_SYM: string;
942
- }
943
-
944
- interface ILocaleNumberPatternDescriptor {
945
- minInt: number;
946
- minFrac: number;
947
- maxFrac: number;
948
- posPre: string;
949
- posSuf: string;
950
- negPre: string;
951
- negSuf: string;
952
- gSize: number;
953
- lgSize: number;
954
- }
955
-
956
- interface ILocaleDateTimeFormatDescriptor {
957
- MONTH: string[];
958
- SHORTMONTH: string[];
959
- DAY: string[];
960
- SHORTDAY: string[];
961
- AMPMS: string[];
962
- medium: string;
963
- short: string;
964
- fullDate: string;
965
- longDate: string;
966
- mediumDate: string;
967
- shortDate: string;
968
- mediumTime: string;
969
- shortTime: string;
970
- }
971
-
972
- ///////////////////////////////////////////////////////////////////////////
973
- // LogService
974
- // see http://docs.angularjs.org/api/ng/service/$log
975
- // see http://docs.angularjs.org/api/ng/provider/$logProvider
976
- ///////////////////////////////////////////////////////////////////////////
977
- interface ILogService {
978
- debug: ILogCall;
979
- error: ILogCall;
980
- info: ILogCall;
981
- log: ILogCall;
982
- warn: ILogCall;
983
- }
984
-
985
- interface ILogProvider extends IServiceProvider {
986
- debugEnabled(): boolean;
987
- debugEnabled(enabled: boolean): ILogProvider;
988
- }
989
-
990
- // We define this as separate interface so we can reopen it later for
991
- // the ngMock module.
992
- interface ILogCall {
993
- (...args: any[]): void;
994
- }
995
-
996
- ///////////////////////////////////////////////////////////////////////////
997
- // ParseService
998
- // see http://docs.angularjs.org/api/ng/service/$parse
999
- // see http://docs.angularjs.org/api/ng/provider/$parseProvider
1000
- ///////////////////////////////////////////////////////////////////////////
1001
- interface IParseService {
1002
- (
1003
- expression: string,
1004
- interceptorFn?: (value: any, scope: IScope, locals: any) => any,
1005
- expensiveChecks?: boolean,
1006
- ): ICompiledExpression;
1007
- }
1008
-
1009
- interface IParseProvider {
1010
- logPromiseWarnings(): boolean;
1011
- logPromiseWarnings(value: boolean): IParseProvider;
1012
-
1013
- unwrapPromises(): boolean;
1014
- unwrapPromises(value: boolean): IParseProvider;
1015
-
1016
- /**
1017
- * Configure $parse service to add literal values that will be present as literal at expressions.
1018
- *
1019
- * @param literalName Token for the literal value. The literal name value must be a valid literal name.
1020
- * @param literalValue Value for this literal. All literal values must be primitives or `undefined`.
1021
- */
1022
- addLiteral(literalName: string, literalValue: any): void;
1023
-
1024
- /**
1025
- * Allows defining the set of characters that are allowed in Angular expressions. The function identifierStart will get called to know if a given character is a valid character to be the first character for an identifier. The function identifierContinue will get called to know if a given character is a valid character to be a follow-up identifier character. The functions identifierStart and identifierContinue will receive as arguments the single character to be identifier and the character code point. These arguments will be string and numeric. Keep in mind that the string parameter can be two characters long depending on the character representation. It is expected for the function to return true or false, whether that character is allowed or not.
1026
- * Since this function will be called extensivelly, keep the implementation of these functions fast, as the performance of these functions have a direct impact on the expressions parsing speed.
1027
- *
1028
- * @param identifierStart The function that will decide whether the given character is a valid identifier start character.
1029
- * @param identifierContinue The function that will decide whether the given character is a valid identifier continue character.
1030
- */
1031
- setIdentifierFns(
1032
- identifierStart?: (character: string, codePoint: number) => boolean,
1033
- identifierContinue?: (character: string, codePoint: number) => boolean,
1034
- ): void;
1035
- }
1036
-
1037
- interface ICompiledExpression {
1038
- (context: any, locals?: any): any;
1039
-
1040
- literal: boolean;
1041
- constant: boolean;
1042
-
1043
- // If value is not provided, undefined is gonna be used since the implementation
1044
- // does not check the parameter. Let's force a value for consistency. If consumer
1045
- // whants to undefine it, pass the undefined value explicitly.
1046
- assign(context: any, value: any): any;
1047
- }
1048
-
1049
- /**
1050
- * $location - $locationProvider - service in module ng
1051
- * see https://docs.angularjs.org/api/ng/service/$location
1052
- */
1053
- interface ILocationService {
1054
- absUrl(): string;
1055
-
1056
- /**
1057
- * Returns the hash fragment
1058
- */
1059
- hash(): string;
1060
-
1061
- /**
1062
- * Changes the hash fragment and returns `$location`
1063
- */
1064
- hash(newHash: string | null): ILocationService;
1065
-
1066
- host(): string;
1067
-
1068
- /**
1069
- * Return path of current url
1070
- */
1071
- path(): string;
1072
-
1073
- /**
1074
- * Change path when called with parameter and return $location.
1075
- * Note: Path should always begin with forward slash (/), this method will add the forward slash if it is missing.
1076
- *
1077
- * @param path New path
1078
- */
1079
- path(path: string): ILocationService;
1080
-
1081
- port(): number;
1082
- protocol(): string;
1083
- replace(): ILocationService;
1084
-
1085
- /**
1086
- * Return search part (as object) of current url
1087
- */
1088
- search(): any;
1089
-
1090
- /**
1091
- * Change search part when called with parameter and return $location.
1092
- *
1093
- * @param search When called with a single argument the method acts as a setter, setting the search component of $location to the specified value.
1094
- *
1095
- * If the argument is a hash object containing an array of values, these values will be encoded as duplicate search parameters in the url.
1096
- */
1097
- search(search: any): ILocationService;
1098
-
1099
- /**
1100
- * Change search part when called with parameter and return $location.
1101
- *
1102
- * @param search New search params
1103
- * @param paramValue If search is a string or a Number, then paramValue will override only a single search property. If paramValue is null, the property specified via the first argument will be deleted. If paramValue is an array, it will override the property of the search component of $location specified via the first argument. If paramValue is true, the property specified via the first argument will be added with no value nor trailing equal sign.
1104
- */
1105
- search(
1106
- search: string,
1107
- paramValue: string | number | null | string[] | boolean,
1108
- ): ILocationService;
1109
-
1110
- state(): any;
1111
- state(state: any): ILocationService;
1112
- url(): string;
1113
- url(url: string): ILocationService;
1114
- }
1115
-
1116
- interface ILocationProvider extends IServiceProvider {
1117
- hashPrefix(): string;
1118
- hashPrefix(prefix: string): ILocationProvider;
1119
- html5Mode(): boolean;
1120
-
1121
- // Documentation states that parameter is string, but
1122
- // implementation tests it as boolean, which makes more sense
1123
- // since this is a toggler
1124
- html5Mode(active: boolean): ILocationProvider;
1125
- html5Mode(mode: {
1126
- enabled?: boolean | undefined;
1127
- requireBase?: boolean | undefined;
1128
- rewriteLinks?: boolean | undefined;
1129
- }): ILocationProvider;
1130
- }
1131
-
1132
- ///////////////////////////////////////////////////////////////////////////
1133
- // DocumentService
1134
- // see http://docs.angularjs.org/api/ng/service/$document
1135
- ///////////////////////////////////////////////////////////////////////////
1136
- interface IDocumentService extends JQLite {
1137
- // Must return intersection type for index signature compatibility with JQuery
1138
- [index: number]: HTMLElement & Document;
1139
- }
1140
-
1141
- ///////////////////////////////////////////////////////////////////////////
1142
- // ExceptionHandlerService
1143
- // see http://docs.angularjs.org/api/ng/service/$exceptionHandler
1144
- ///////////////////////////////////////////////////////////////////////////
1145
- interface IExceptionHandlerService {
1146
- (exception: Error, cause?: string): void;
1147
- }
1148
-
1149
- ///////////////////////////////////////////////////////////////////////////
1150
- // RootElementService
1151
- // see http://docs.angularjs.org/api/ng/service/$rootElement
1152
- ///////////////////////////////////////////////////////////////////////////
1153
- interface IRootElementService extends JQLite {}
1154
-
1155
- interface IQResolveReject<T> {
1156
- (): void;
1157
- (value: T): void;
1158
- }
1159
- /**
1160
- * $q - service in module ng
1161
- * A promise/deferred implementation inspired by Kris Kowal's Q.
1162
- * See http://docs.angularjs.org/api/ng/service/$q
1163
- */
1164
- interface IQService {
1165
- new <T>(
1166
- resolver: (
1167
- resolve: IQResolveReject<T>,
1168
- reject: IQResolveReject<any>,
1169
- ) => any,
1170
- ): IPromise<T>;
1171
- <T>(
1172
- resolver: (
1173
- resolve: IQResolveReject<T>,
1174
- reject: IQResolveReject<any>,
1175
- ) => any,
1176
- ): IPromise<T>;
1177
-
1178
- /**
1179
- * Combines multiple promises into a single promise that is resolved when all of the input promises are resolved.
1180
- *
1181
- * Returns a single promise that will be resolved with an array of values, each value corresponding to the promise at the same index in the promises array. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value.
1182
- *
1183
- * @param promises An array of promises.
1184
- */
1185
- all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(
1186
- values: [
1187
- T1 | IPromise<T1>,
1188
- T2 | IPromise<T2>,
1189
- T3 | IPromise<T3>,
1190
- T4 | IPromise<T4>,
1191
- T5 | IPromise<T5>,
1192
- T6 | IPromise<T6>,
1193
- T7 | IPromise<T7>,
1194
- T8 | IPromise<T8>,
1195
- T9 | IPromise<T9>,
1196
- T10 | IPromise<T10>,
1197
- ],
1198
- ): IPromise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
1199
- all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(
1200
- values: [
1201
- T1 | IPromise<T1>,
1202
- T2 | IPromise<T2>,
1203
- T3 | IPromise<T3>,
1204
- T4 | IPromise<T4>,
1205
- T5 | IPromise<T5>,
1206
- T6 | IPromise<T6>,
1207
- T7 | IPromise<T7>,
1208
- T8 | IPromise<T8>,
1209
- T9 | IPromise<T9>,
1210
- ],
1211
- ): IPromise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
1212
- all<T1, T2, T3, T4, T5, T6, T7, T8>(
1213
- values: [
1214
- T1 | IPromise<T1>,
1215
- T2 | IPromise<T2>,
1216
- T3 | IPromise<T3>,
1217
- T4 | IPromise<T4>,
1218
- T5 | IPromise<T5>,
1219
- T6 | IPromise<T6>,
1220
- T7 | IPromise<T7>,
1221
- T8 | IPromise<T8>,
1222
- ],
1223
- ): IPromise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
1224
- all<T1, T2, T3, T4, T5, T6, T7>(
1225
- values: [
1226
- T1 | IPromise<T1>,
1227
- T2 | IPromise<T2>,
1228
- T3 | IPromise<T3>,
1229
- T4 | IPromise<T4>,
1230
- T5 | IPromise<T5>,
1231
- T6 | IPromise<T6>,
1232
- T7 | IPromise<T7>,
1233
- ],
1234
- ): IPromise<[T1, T2, T3, T4, T5, T6, T7]>;
1235
- all<T1, T2, T3, T4, T5, T6>(
1236
- values: [
1237
- T1 | IPromise<T1>,
1238
- T2 | IPromise<T2>,
1239
- T3 | IPromise<T3>,
1240
- T4 | IPromise<T4>,
1241
- T5 | IPromise<T5>,
1242
- T6 | IPromise<T6>,
1243
- ],
1244
- ): IPromise<[T1, T2, T3, T4, T5, T6]>;
1245
- all<T1, T2, T3, T4, T5>(
1246
- values: [
1247
- T1 | IPromise<T1>,
1248
- T2 | IPromise<T2>,
1249
- T3 | IPromise<T3>,
1250
- T4 | IPromise<T4>,
1251
- T5 | IPromise<T5>,
1252
- ],
1253
- ): IPromise<[T1, T2, T3, T4, T5]>;
1254
- all<T1, T2, T3, T4>(
1255
- values: [
1256
- T1 | IPromise<T1>,
1257
- T2 | IPromise<T2>,
1258
- T3 | IPromise<T3>,
1259
- T4 | IPromise<T4>,
1260
- ],
1261
- ): IPromise<[T1, T2, T3, T4]>;
1262
- all<T1, T2, T3>(
1263
- values: [T1 | IPromise<T1>, T2 | IPromise<T2>, T3 | IPromise<T3>],
1264
- ): IPromise<[T1, T2, T3]>;
1265
- all<T1, T2>(
1266
- values: [T1 | IPromise<T1>, T2 | IPromise<T2>],
1267
- ): IPromise<[T1, T2]>;
1268
- all<TAll>(promises: Array<TAll | IPromise<TAll>>): IPromise<TAll[]>;
1269
- /**
1270
- * Combines multiple promises into a single promise that is resolved when all of the input promises are resolved.
1271
- *
1272
- * Returns a single promise that will be resolved with a hash of values, each value corresponding to the promise at the same key in the promises hash. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value.
1273
- *
1274
- * @param promises A hash of promises.
1275
- */
1276
- all<T>(promises: { [K in keyof T]: IPromise<T[K]> | T[K] }): IPromise<T>;
1277
- /**
1278
- * Creates a Deferred object which represents a task which will finish in the future.
1279
- */
1280
- defer<T>(): IDeferred<T>;
1281
- /**
1282
- * Returns a promise that resolves or rejects as soon as one of those promises resolves or rejects, with the value or reason from that promise.
1283
- *
1284
- * @param promises A list or hash of promises.
1285
- */
1286
- race<T>(
1287
- promises: Array<IPromise<T>> | { [key: string]: IPromise<T> },
1288
- ): IPromise<T>;
1289
- /**
1290
- * Creates a promise that is resolved as rejected with the specified reason. This api should be used to forward rejection in a chain of promises. If you are dealing with the last promise in a promise chain, you don't need to worry about it.
1291
- *
1292
- * When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of reject as the throw keyword in JavaScript. This also means that if you "catch" an error via a promise error callback and you want to forward the error to the promise derived from the current promise, you have to "rethrow" the error by returning a rejection constructed via reject.
1293
- *
1294
- * @param reason Constant, message, exception or an object representing the rejection reason.
1295
- */
1296
- reject(reason?: any): IPromise<never>;
1297
- /**
1298
- * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted.
1299
- *
1300
- * @param value Value or a promise
1301
- */
1302
- resolve<T>(value: PromiseLike<T> | T): IPromise<T>;
1303
- /**
1304
- * @deprecated Since TS 2.4, inference is stricter and no longer produces the desired type when T1 !== T2.
1305
- * To use resolve with two different types, pass a union type to the single-type-argument overload.
1306
- */
1307
- resolve<T1, T2>(value: PromiseLike<T1> | T2): IPromise<T1 | T2>;
1308
- /**
1309
- * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted.
1310
- */
1311
- resolve(): IPromise<void>;
1312
- /**
1313
- * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted.
1314
- *
1315
- * @param value Value or a promise
1316
- */
1317
- when<T>(value: PromiseLike<T> | T): IPromise<T>;
1318
- when<T1, T2>(value: PromiseLike<T1> | T2): IPromise<T1 | T2>;
1319
- when<TResult, T>(
1320
- value: PromiseLike<T> | T,
1321
- successCallback: (promiseValue: T) => PromiseLike<TResult> | TResult,
1322
- ): IPromise<TResult>;
1323
- when<TResult, T>(
1324
- value: T,
1325
- successCallback: (promiseValue: T) => PromiseLike<TResult> | TResult,
1326
- errorCallback: null | undefined | ((reason: any) => any),
1327
- notifyCallback?: (state: any) => any,
1328
- ): IPromise<TResult>;
1329
- when<TResult, TResult2, T>(
1330
- value: PromiseLike<T>,
1331
- successCallback: (promiseValue: T) => PromiseLike<TResult> | TResult,
1332
- errorCallback: (reason: any) => TResult2 | PromiseLike<TResult2>,
1333
- notifyCallback?: (state: any) => any,
1334
- ): IPromise<TResult | TResult2>;
1335
- /**
1336
- * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted.
1337
- */
1338
- when(): IPromise<void>;
1339
- }
1340
-
1341
- interface IQProvider {
1342
- /**
1343
- * Retrieves or overrides whether to generate an error when a rejected promise is not handled.
1344
- * This feature is enabled by default.
1345
- *
1346
- * @returns Current value
1347
- */
1348
- errorOnUnhandledRejections(): boolean;
1349
-
1350
- /**
1351
- * Retrieves or overrides whether to generate an error when a rejected promise is not handled.
1352
- * This feature is enabled by default.
1353
- *
1354
- * @param value Whether to generate an error when a rejected promise is not handled.
1355
- * @returns Self for chaining otherwise.
1356
- */
1357
- errorOnUnhandledRejections(value: boolean): IQProvider;
1358
- }
1359
-
1360
- interface IPromise<T> {
1361
- /**
1362
- * Regardless of when the promise was or will be resolved or rejected, then calls one of
1363
- * the success or error callbacks asynchronously as soon as the result is available. The
1364
- * callbacks are called with a single argument: the result or rejection reason.
1365
- * Additionally, the notify callback may be called zero or more times to provide a
1366
- * progress indication, before the promise is resolved or rejected.
1367
- * The `successCallBack` may return `IPromise<never>` for when a `$q.reject()` needs to
1368
- * be returned.
1369
- * This method returns a new promise which is resolved or rejected via the return value
1370
- * of the `successCallback`, `errorCallback`. It also notifies via the return value of
1371
- * the `notifyCallback` method. The promise can not be resolved or rejected from the
1372
- * `notifyCallback` method.
1373
- */
1374
- then<TResult1 = T, TResult2 = never>(
1375
- successCallback?:
1376
- | ((value: T) => PromiseLike<never> | PromiseLike<TResult1> | TResult1)
1377
- | null,
1378
- errorCallback?:
1379
- | ((
1380
- reason: any,
1381
- ) => PromiseLike<never> | PromiseLike<TResult2> | TResult2)
1382
- | null,
1383
- notifyCallback?: (state: any) => any,
1384
- ): IPromise<TResult1 | TResult2>;
1385
- then<TResult1 = T, TResult2 = never>(
1386
- successCallback?:
1387
- | ((value: T) => IPromise<never> | IPromise<TResult1> | TResult1)
1388
- | null,
1389
- errorCallback?:
1390
- | ((reason: any) => IPromise<never> | IPromise<TResult2> | TResult2)
1391
- | null,
1392
- notifyCallback?: (state: any) => any,
1393
- ): IPromise<TResult1 | TResult2>;
1394
-
1395
- /**
1396
- * Shorthand for promise.then(null, errorCallback)
1397
- */
1398
- catch<TResult = never>(
1399
- onRejected?:
1400
- | ((reason: any) => PromiseLike<never> | PromiseLike<TResult> | TResult)
1401
- | null,
1402
- ): IPromise<T | TResult>;
1403
- catch<TResult = never>(
1404
- onRejected?:
1405
- | ((reason: any) => IPromise<never> | IPromise<TResult> | TResult)
1406
- | null,
1407
- ): IPromise<T | TResult>;
1408
-
1409
- /**
1410
- * Allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value. This is useful to release resources or do some clean-up that needs to be done whether the promise was rejected or resolved. See the full specification for more information.
1411
- *
1412
- * Because finally is a reserved word in JavaScript and reserved keywords are not supported as property names by ES3, you'll need to invoke the method like promise['finally'](callback) to make your code IE8 and Android 2.x compatible.
1413
- */
1414
- finally(finallyCallback: () => void): IPromise<T>;
1415
- }
1416
-
1417
- interface IDeferred<T> {
1418
- resolve(value?: T | IPromise<T>): void;
1419
- reject(reason?: any): void;
1420
- notify(state?: any): void;
1421
- promise: IPromise<T>;
1422
- }
1423
-
1424
- ///////////////////////////////////////////////////////////////////////////
1425
- // AnchorScrollService
1426
- // see http://docs.angularjs.org/api/ng/service/$anchorScroll
1427
- ///////////////////////////////////////////////////////////////////////////
1428
- interface IAnchorScrollService {
1429
- (): void;
1430
- (hash: string): void;
1431
- yOffset: any;
1432
- }
1433
-
1434
- interface IAnchorScrollProvider extends IServiceProvider {
1435
- disableAutoScrolling(): void;
1436
- }
1437
-
1438
- /**
1439
- * $cacheFactory - service in module ng
1440
- *
1441
- * Factory that constructs Cache objects and gives access to them.
1442
- *
1443
- * see https://docs.angularjs.org/api/ng/service/$cacheFactory
1444
- */
1445
- interface ICacheFactoryService {
1446
- /**
1447
- * Factory that constructs Cache objects and gives access to them.
1448
- *
1449
- * @param cacheId Name or id of the newly created cache.
1450
- * @param optionsMap Options object that specifies the cache behavior. Properties:
1451
- *
1452
- * capacity — turns the cache into LRU cache.
1453
- */
1454
- (
1455
- cacheId: string,
1456
- optionsMap?: { capacity?: number | undefined },
1457
- ): ICacheObject;
1458
-
1459
- /**
1460
- * Get information about all the caches that have been created.
1461
- * @returns key-value map of cacheId to the result of calling cache#info
1462
- */
1463
- info(): any;
1464
-
1465
- /**
1466
- * Get access to a cache object by the cacheId used when it was created.
1467
- *
1468
- * @param cacheId Name or id of a cache to access.
1469
- */
1470
- get(cacheId: string): ICacheObject;
1471
- }
1472
-
1473
- /**
1474
- * $cacheFactory.Cache - type in module ng
1475
- *
1476
- * A cache object used to store and retrieve data, primarily used by $http and the script directive to cache templates and other data.
1477
- *
1478
- * see https://docs.angularjs.org/api/ng/type/$cacheFactory.Cache
1479
- */
1480
- interface ICacheObject {
1481
- /**
1482
- * Retrieve information regarding a particular Cache.
1483
- */
1484
- info(): {
1485
- /**
1486
- * the id of the cache instance
1487
- */
1488
- id: string;
1489
-
1490
- /**
1491
- * the number of entries kept in the cache instance
1492
- */
1493
- size: number;
1494
- // ...: any additional properties from the options object when creating the cache.
1495
- };
1496
-
1497
- /**
1498
- * Inserts a named entry into the Cache object to be retrieved later, and incrementing the size of the cache if the key was not already present in the cache. If behaving like an LRU cache, it will also remove stale entries from the set.
1499
- *
1500
- * It will not insert undefined values into the cache.
1501
- *
1502
- * @param key the key under which the cached data is stored.
1503
- * @param value the value to store alongside the key. If it is undefined, the key will not be stored.
1504
- */
1505
- put<T>(key: string, value?: T): T;
1506
-
1507
- /**
1508
- * Retrieves named data stored in the Cache object.
1509
- *
1510
- * @param key the key of the data to be retrieved
1511
- */
1512
- get<T>(key: string): T | undefined;
1513
-
1514
- /**
1515
- * Removes an entry from the Cache object.
1516
- *
1517
- * @param key the key of the entry to be removed
1518
- */
1519
- remove(key: string): void;
1520
-
1521
- /**
1522
- * Clears the cache object of any entries.
1523
- */
1524
- removeAll(): void;
1525
-
1526
- /**
1527
- * Destroys the Cache object entirely, removing it from the $cacheFactory set.
1528
- */
1529
- destroy(): void;
1530
- }
1531
-
1532
- ///////////////////////////////////////////////////////////////////////////
1533
- // CompileService
1534
- // see http://docs.angularjs.org/api/ng/service/$compile
1535
- // see http://docs.angularjs.org/api/ng/provider/$compileProvider
1536
- ///////////////////////////////////////////////////////////////////////////
1537
- interface ICompileService {
1538
- (
1539
- element: string | Element | JQuery,
1540
- transclude?: ITranscludeFunction,
1541
- maxPriority?: number,
1542
- ): ITemplateLinkingFunction;
1543
- }
1544
-
1545
- interface ICompileProvider extends IServiceProvider {
1546
- directive<
1547
- TScope extends IScope = IScope,
1548
- TElement extends JQLite = JQLite,
1549
- TAttributes extends IAttributes = IAttributes,
1550
- TController extends IDirectiveController = IController,
1551
- >(
1552
- name: string,
1553
- directiveFactory: Injectable<
1554
- IDirectiveFactory<TScope, TElement, TAttributes, TController>
1555
- >,
1556
- ): ICompileProvider;
1557
- directive<
1558
- TScope extends IScope = IScope,
1559
- TElement extends JQLite = JQLite,
1560
- TAttributes extends IAttributes = IAttributes,
1561
- TController extends IDirectiveController = IController,
1562
- >(object: {
1563
- [directiveName: string]: Injectable<
1564
- IDirectiveFactory<TScope, TElement, TAttributes, TController>
1565
- >;
1566
- }): ICompileProvider;
1567
-
1568
- component(name: string, options: IComponentOptions): ICompileProvider;
1569
- component(object: {
1570
- [componentName: string]: IComponentOptions;
1571
- }): ICompileProvider;
1572
-
1573
- /** @deprecated The old name of aHrefSanitizationTrustedUrlList. Kept for compatibility. */
1574
- aHrefSanitizationWhitelist(): RegExp;
1575
- /** @deprecated The old name of aHrefSanitizationTrustedUrlList. Kept for compatibility. */
1576
- aHrefSanitizationWhitelist(regexp: RegExp): ICompileProvider;
1577
-
1578
- aHrefSanitizationTrustedUrlList(): RegExp;
1579
- aHrefSanitizationTrustedUrlList(regexp: RegExp): ICompileProvider;
1580
-
1581
- /** @deprecated The old name of imgSrcSanitizationTrustedUrlList. Kept for compatibility. */
1582
- imgSrcSanitizationWhitelist(): RegExp;
1583
- /** @deprecated The old name of imgSrcSanitizationTrustedUrlList. Kept for compatibility. */
1584
- imgSrcSanitizationWhitelist(regexp: RegExp): ICompileProvider;
1585
-
1586
- imgSrcSanitizationTrustedUrlList(): RegExp;
1587
- imgSrcSanitizationTrustedUrlList(regexp: RegExp): ICompileProvider;
1588
-
1589
- debugInfoEnabled(): boolean;
1590
- debugInfoEnabled(enabled: boolean): ICompileProvider;
1591
-
1592
- /**
1593
- * Sets the number of times $onChanges hooks can trigger new changes before giving up and assuming that the model is unstable.
1594
- * Increasing the TTL could have performance implications, so you should not change it without proper justification.
1595
- * Default: 10.
1596
- * See: https://docs.angularjs.org/api/ng/provider/$compileProvider#onChangesTtl
1597
- */
1598
- onChangesTtl(): number;
1599
- onChangesTtl(limit: number): ICompileProvider;
1600
-
1601
- /**
1602
- * It indicates to the compiler whether or not directives on comments should be compiled.
1603
- * It results in a compilation performance gain since the compiler doesn't have to check comments when looking for directives.
1604
- * Defaults to true.
1605
- * See: https://docs.angularjs.org/api/ng/provider/$compileProvider#commentDirectivesEnabled
1606
- */
1607
- commentDirectivesEnabled(): boolean;
1608
- commentDirectivesEnabled(enabled: boolean): ICompileProvider;
1609
-
1610
- /**
1611
- * It indicates to the compiler whether or not directives on element classes should be compiled.
1612
- * It results in a compilation performance gain since the compiler doesn't have to check element classes when looking for directives.
1613
- * Defaults to true.
1614
- * See: https://docs.angularjs.org/api/ng/provider/$compileProvider#cssClassDirectivesEnabled
1615
- */
1616
- cssClassDirectivesEnabled(): boolean;
1617
- cssClassDirectivesEnabled(enabled: boolean): ICompileProvider;
1618
-
1619
- /**
1620
- * Call this method to enable/disable strict component bindings check.
1621
- * If enabled, the compiler will enforce that for all bindings of a
1622
- * component that are not set as optional with ?, an attribute needs
1623
- * to be provided on the component's HTML tag.
1624
- * Defaults to false.
1625
- * See: https://docs.angularjs.org/api/ng/provider/$compileProvider#strictComponentBindingsEnabled
1626
- */
1627
- strictComponentBindingsEnabled(): boolean;
1628
- strictComponentBindingsEnabled(enabled: boolean): ICompileProvider;
1629
- }
1630
-
1631
- interface ICloneAttachFunction {
1632
- // Let's hint but not force cloneAttachFn's signature
1633
- (clonedElement?: JQLite, scope?: IScope): any;
1634
- }
1635
-
1636
- // This corresponds to the "publicLinkFn" returned by $compile.
1637
- interface ITemplateLinkingFunction {
1638
- (
1639
- scope: IScope,
1640
- cloneAttachFn?: ICloneAttachFunction,
1641
- options?: ITemplateLinkingFunctionOptions,
1642
- ): JQLite;
1643
- }
1644
-
1645
- interface ITemplateLinkingFunctionOptions {
1646
- parentBoundTranscludeFn?: ITranscludeFunction | undefined;
1647
- transcludeControllers?:
1648
- | {
1649
- [controller: string]: { instance: IController };
1650
- }
1651
- | undefined;
1652
- futureParentElement?: JQuery | undefined;
1653
- }
1654
-
1655
- /**
1656
- * This corresponds to $transclude passed to controllers and to the transclude function passed to link functions.
1657
- * https://docs.angularjs.org/api/ng/service/$compile#-controller-
1658
- * http://teropa.info/blog/2015/06/09/transclusion.html
1659
- */
1660
- interface ITranscludeFunction {
1661
- // If the scope is provided, then the cloneAttachFn must be as well.
1662
- (
1663
- scope: IScope,
1664
- cloneAttachFn: ICloneAttachFunction,
1665
- futureParentElement?: JQuery,
1666
- slotName?: string,
1667
- ): JQLite;
1668
- // If one argument is provided, then it's assumed to be the cloneAttachFn.
1669
- (
1670
- cloneAttachFn?: ICloneAttachFunction,
1671
- futureParentElement?: JQuery,
1672
- slotName?: string,
1673
- ): JQLite;
1674
-
1675
- /**
1676
- * Returns true if the specified slot contains content (i.e. one or more DOM nodes)
1677
- */
1678
- isSlotFilled(slotName: string): boolean;
1679
- }
1680
-
1681
- ///////////////////////////////////////////////////////////////////////////
1682
- // ControllerService
1683
- // see http://docs.angularjs.org/api/ng/service/$controller
1684
- // see http://docs.angularjs.org/api/ng/provider/$controllerProvider
1685
- ///////////////////////////////////////////////////////////////////////////
1686
-
1687
- /**
1688
- * The minimal local definitions required by $controller(ctrl, locals) calls.
1689
- */
1690
- interface IControllerLocals {
1691
- $scope: ng.IScope;
1692
- $element: JQuery;
1693
- }
1694
-
1695
- interface IControllerService {
1696
- // Although the documentation doesn't state this, locals are optional
1697
- <T>(controllerConstructor: new (...args: any[]) => T, locals?: any): T;
1698
- <T>(controllerConstructor: (...args: any[]) => T, locals?: any): T;
1699
- <T>(controllerName: string, locals?: any): T;
1700
- }
1701
-
1702
- interface IControllerProvider extends IServiceProvider {
1703
- register(name: string, controllerConstructor: Function): void;
1704
- register(name: string, dependencyAnnotatedConstructor: any[]): void;
1705
- }
1706
-
1707
- /**
1708
- * xhrFactory
1709
- * Replace or decorate this service to create your own custom XMLHttpRequest objects.
1710
- * see https://docs.angularjs.org/api/ng/service/$xhrFactory
1711
- */
1712
- interface IXhrFactory<T> {
1713
- (method: string, url: string): T;
1714
- }
1715
-
1716
- /**
1717
- * HttpService
1718
- * see http://docs.angularjs.org/api/ng/service/$http
1719
- */
1720
- interface IHttpService {
1721
- /**
1722
- * Object describing the request to be made and how it should be processed.
1723
- */
1724
- <T>(config: IRequestConfig): IHttpPromise<T>;
1725
-
1726
- /**
1727
- * Shortcut method to perform GET request.
1728
- *
1729
- * @param url Relative or absolute URL specifying the destination of the request
1730
- * @param config Optional configuration object
1731
- */
1732
- get<T>(url: string, config?: IRequestShortcutConfig): IHttpPromise<T>;
1733
-
1734
- /**
1735
- * Shortcut method to perform DELETE request.
1736
- *
1737
- * @param url Relative or absolute URL specifying the destination of the request
1738
- * @param config Optional configuration object
1739
- */
1740
- delete<T>(url: string, config?: IRequestShortcutConfig): IHttpPromise<T>;
1741
-
1742
- /**
1743
- * Shortcut method to perform HEAD request.
1744
- *
1745
- * @param url Relative or absolute URL specifying the destination of the request
1746
- * @param config Optional configuration object
1747
- */
1748
- head<T>(url: string, config?: IRequestShortcutConfig): IHttpPromise<T>;
1749
-
1750
- /**
1751
- * Shortcut method to perform POST request.
1752
- *
1753
- * @param url Relative or absolute URL specifying the destination of the request
1754
- * @param data Request content
1755
- * @param config Optional configuration object
1756
- */
1757
- post<T>(
1758
- url: string,
1759
- data: any,
1760
- config?: IRequestShortcutConfig,
1761
- ): IHttpPromise<T>;
1762
-
1763
- /**
1764
- * Shortcut method to perform PUT request.
1765
- *
1766
- * @param url Relative or absolute URL specifying the destination of the request
1767
- * @param data Request content
1768
- * @param config Optional configuration object
1769
- */
1770
- put<T>(
1771
- url: string,
1772
- data: any,
1773
- config?: IRequestShortcutConfig,
1774
- ): IHttpPromise<T>;
1775
-
1776
- /**
1777
- * Shortcut method to perform PATCH request.
1778
- *
1779
- * @param url Relative or absolute URL specifying the destination of the request
1780
- * @param data Request content
1781
- * @param config Optional configuration object
1782
- */
1783
- patch<T>(
1784
- url: string,
1785
- data: any,
1786
- config?: IRequestShortcutConfig,
1787
- ): IHttpPromise<T>;
1788
-
1789
- /**
1790
- * Runtime equivalent of the $httpProvider.defaults property. Allows configuration of default headers, withCredentials as well as request and response transformations.
1791
- */
1792
- defaults: IHttpProviderDefaults;
1793
-
1794
- /**
1795
- * Array of config objects for currently pending requests. This is primarily meant to be used for debugging purposes.
1796
- */
1797
- pendingRequests: IRequestConfig[];
1798
- }
1799
-
1800
- /**
1801
- * Object describing the request to be made and how it should be processed.
1802
- * see http://docs.angularjs.org/api/ng/service/$http#usage
1803
- */
1804
- interface IRequestShortcutConfig extends IHttpProviderDefaults {
1805
- /**
1806
- * {Object.<string|Object>}
1807
- * Map of strings or objects which will be turned to ?key1=value1&key2=value2 after the url. If the value is not a string, it will be JSONified.
1808
- */
1809
- params?: any;
1810
-
1811
- /**
1812
- * {string|Object}
1813
- * Data to be sent as the request message data.
1814
- */
1815
- data?: any;
1816
-
1817
- /**
1818
- * Timeout in milliseconds, or promise that should abort the request when resolved.
1819
- */
1820
- timeout?: number | IPromise<any> | undefined;
1821
-
1822
- /**
1823
- * See [XMLHttpRequest.responseType]https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#xmlhttprequest-responsetype
1824
- */
1825
- responseType?: string | undefined;
1826
-
1827
- /**
1828
- * Name of the parameter added (by AngularJS) to the request to specify the name (in the server response) of the JSON-P callback to invoke.
1829
- * If unspecified, $http.defaults.jsonpCallbackParam will be used by default. This property is only applicable to JSON-P requests.
1830
- */
1831
- jsonpCallbackParam?: string | undefined;
1832
- }
1833
-
1834
- /**
1835
- * Object describing the request to be made and how it should be processed.
1836
- * see http://docs.angularjs.org/api/ng/service/$http#usage
1837
- */
1838
- interface IRequestConfig extends IRequestShortcutConfig {
1839
- /**
1840
- * HTTP method (e.g. 'GET', 'POST', etc)
1841
- */
1842
- method: string;
1843
- /**
1844
- * Absolute or relative URL of the resource that is being requested.
1845
- */
1846
- url: string;
1847
- /**
1848
- * Event listeners to be bound to the XMLHttpRequest object.
1849
- * To bind events to the XMLHttpRequest upload object, use uploadEventHandlers. The handler will be called in the context of a $apply block.
1850
- */
1851
- eventHandlers?:
1852
- | { [type: string]: EventListenerOrEventListenerObject }
1853
- | undefined;
1854
- /**
1855
- * Event listeners to be bound to the XMLHttpRequest upload object.
1856
- * To bind events to the XMLHttpRequest object, use eventHandlers. The handler will be called in the context of a $apply block.
1857
- */
1858
- uploadEventHandlers?:
1859
- | { [type: string]: EventListenerOrEventListenerObject }
1860
- | undefined;
1861
- }
1862
-
1863
- interface IHttpHeadersGetter {
1864
- (): { [name: string]: string };
1865
- (headerName: string): string;
1866
- }
1867
-
1868
- interface IHttpPromiseCallback<T> {
1869
- (
1870
- data: T,
1871
- status: number,
1872
- headers: IHttpHeadersGetter,
1873
- config: IRequestConfig,
1874
- ): void;
1875
- }
1876
-
1877
- interface IHttpResponse<T> {
1878
- data: T;
1879
- status: number;
1880
- headers: IHttpHeadersGetter;
1881
- config: IRequestConfig;
1882
- statusText: string;
1883
- /** Added in AngularJS 1.6.6 */
1884
- xhrStatus: "complete" | "error" | "timeout" | "abort";
1885
- }
1886
-
1887
- /** @deprecated The old name of IHttpResponse. Kept for compatibility. */
1888
- type IHttpPromiseCallbackArg<T> = IHttpResponse<T>;
1889
-
1890
- type IHttpPromise<T> = IPromise<IHttpResponse<T>>;
1891
-
1892
- // See the jsdoc for transformData() at https://github.com/angular/angular.js/blob/master/src/ng/http.js#L228
1893
- interface IHttpRequestTransformer {
1894
- (data: any, headersGetter: IHttpHeadersGetter): any;
1895
- }
1896
-
1897
- // The definition of fields are the same as IHttpResponse
1898
- interface IHttpResponseTransformer {
1899
- (data: any, headersGetter: IHttpHeadersGetter, status: number): any;
1900
- }
1901
-
1902
- interface HttpHeaderType {
1903
- [requestType: string]: string | ((config: IRequestConfig) => string);
1904
- }
1905
-
1906
- interface IHttpRequestConfigHeaders {
1907
- [requestType: string]: any;
1908
- common?: any;
1909
- get?: any;
1910
- post?: any;
1911
- put?: any;
1912
- patch?: any;
1913
- }
1914
-
1915
- /**
1916
- * Object that controls the defaults for $http provider. Not all fields of IRequestShortcutConfig can be configured
1917
- * via defaults and the docs do not say which. The following is based on the inspection of the source code.
1918
- * https://docs.angularjs.org/api/ng/service/$http#defaults
1919
- * https://docs.angularjs.org/api/ng/service/$http#usage
1920
- * https://docs.angularjs.org/api/ng/provider/$httpProvider The properties section
1921
- */
1922
- interface IHttpProviderDefaults {
1923
- /**
1924
- * {boolean|Cache}
1925
- * If true, a default $http cache will be used to cache the GET request, otherwise if a cache instance built with $cacheFactory, this cache will be used for caching.
1926
- */
1927
- cache?: any;
1928
-
1929
- /**
1930
- * Transform function or an array of such functions. The transform function takes the http request body and
1931
- * headers and returns its transformed (typically serialized) version.
1932
- * @see {@link https://docs.angularjs.org/api/ng/service/$http#transforming-requests-and-responses}
1933
- */
1934
- transformRequest?:
1935
- | IHttpRequestTransformer
1936
- | IHttpRequestTransformer[]
1937
- | undefined;
1938
-
1939
- /**
1940
- * Transform function or an array of such functions. The transform function takes the http response body and
1941
- * headers and returns its transformed (typically deserialized) version.
1942
- */
1943
- transformResponse?:
1944
- | IHttpResponseTransformer
1945
- | IHttpResponseTransformer[]
1946
- | undefined;
1947
-
1948
- /**
1949
- * Map of strings or functions which return strings representing HTTP headers to send to the server. If the
1950
- * return value of a function is null, the header will not be sent.
1951
- * The key of the map is the request verb in lower case. The "common" key applies to all requests.
1952
- * @see {@link https://docs.angularjs.org/api/ng/service/$http#setting-http-headers}
1953
- */
1954
- headers?: IHttpRequestConfigHeaders | undefined;
1955
-
1956
- /** Name of HTTP header to populate with the XSRF token. */
1957
- xsrfHeaderName?: string | undefined;
1958
-
1959
- /** Name of cookie containing the XSRF token. */
1960
- xsrfCookieName?: string | undefined;
1961
-
1962
- /**
1963
- * whether to to set the withCredentials flag on the XHR object. See [requests with credentials]https://developer.mozilla.org/en/http_access_control#section_5 for more information.
1964
- */
1965
- withCredentials?: boolean | undefined;
1966
-
1967
- /**
1968
- * A function used to the prepare string representation of request parameters (specified as an object). If
1969
- * specified as string, it is interpreted as a function registered with the $injector. Defaults to
1970
- * $httpParamSerializer.
1971
- */
1972
- paramSerializer?: string | ((obj: any) => string) | undefined;
1973
- }
1974
-
1975
- interface IHttpInterceptor {
1976
- request?(config: IRequestConfig): IRequestConfig | IPromise<IRequestConfig>;
1977
- requestError?(rejection: any): IRequestConfig | IPromise<IRequestConfig>;
1978
- response?<T>(
1979
- response: IHttpResponse<T>,
1980
- ): IPromise<IHttpResponse<T>> | IHttpResponse<T>;
1981
- responseError?<T>(
1982
- rejection: any,
1983
- ): IPromise<IHttpResponse<T>> | IHttpResponse<T>;
1984
- }
1985
-
1986
- interface IHttpInterceptorFactory {
1987
- (...args: any[]): IHttpInterceptor;
1988
- }
1989
-
1990
- interface IHttpProvider extends IServiceProvider {
1991
- defaults: IHttpProviderDefaults;
1992
-
1993
- /**
1994
- * Register service factories (names or implementations) for interceptors which are called before and after
1995
- * each request.
1996
- */
1997
- interceptors: Array<string | Injectable<IHttpInterceptorFactory>>;
1998
- useApplyAsync(): boolean;
1999
- useApplyAsync(value: boolean): IHttpProvider;
2000
-
2001
- /** @deprecated The old name of xsrfTrustedOrigins. Kept for compatibility. */
2002
- xsrfWhitelistedOrigins: string[];
2003
- /**
2004
- * Array containing URLs whose origins are trusted to receive the XSRF token.
2005
- */
2006
- xsrfTrustedOrigins: string[];
2007
- }
2008
-
2009
- ///////////////////////////////////////////////////////////////////////////
2010
- // HttpBackendService
2011
- // see http://docs.angularjs.org/api/ng/service/$httpBackend
2012
- // You should never need to use this service directly.
2013
- ///////////////////////////////////////////////////////////////////////////
2014
- interface IHttpBackendService {
2015
- // XXX Perhaps define callback signature in the future
2016
- (
2017
- method: string,
2018
- url: string,
2019
- post?: any,
2020
- callback?: Function,
2021
- headers?: any,
2022
- timeout?: number,
2023
- withCredentials?: boolean,
2024
- ): void;
2025
- }
2026
-
2027
- ///////////////////////////////////////////////////////////////////////////
2028
- // InterpolateService
2029
- // see http://docs.angularjs.org/api/ng/service/$interpolate
2030
- // see http://docs.angularjs.org/api/ng/provider/$interpolateProvider
2031
- ///////////////////////////////////////////////////////////////////////////
2032
- interface IInterpolateService {
2033
- (
2034
- text: string,
2035
- mustHaveExpression?: boolean,
2036
- trustedContext?: string,
2037
- allOrNothing?: boolean,
2038
- ): IInterpolationFunction;
2039
- endSymbol(): string;
2040
- startSymbol(): string;
2041
- }
2042
-
2043
- interface IInterpolationFunction {
2044
- (context: any): string;
2045
- }
2046
-
2047
- interface IInterpolateProvider extends IServiceProvider {
2048
- startSymbol(): string;
2049
- startSymbol(value: string): IInterpolateProvider;
2050
- endSymbol(): string;
2051
- endSymbol(value: string): IInterpolateProvider;
2052
- }
2053
-
2054
- ///////////////////////////////////////////////////////////////////////////
2055
- // TemplateCacheService
2056
- // see http://docs.angularjs.org/api/ng/service/$templateCache
2057
- ///////////////////////////////////////////////////////////////////////////
2058
- interface ITemplateCacheService extends ICacheObject {}
2059
-
2060
- ///////////////////////////////////////////////////////////////////////////
2061
- // SCEService
2062
- // see http://docs.angularjs.org/api/ng/service/$sce
2063
- ///////////////////////////////////////////////////////////////////////////
2064
- interface ISCEService {
2065
- getTrusted(type: string, mayBeTrusted: any): any;
2066
- getTrustedCss(value: any): any;
2067
- getTrustedHtml(value: any): any;
2068
- getTrustedJs(value: any): any;
2069
- getTrustedResourceUrl(value: any): any;
2070
- getTrustedUrl(value: any): any;
2071
- parse(type: string, expression: string): (context: any, locals: any) => any;
2072
- parseAsCss(expression: string): (context: any, locals: any) => any;
2073
- parseAsHtml(expression: string): (context: any, locals: any) => any;
2074
- parseAsJs(expression: string): (context: any, locals: any) => any;
2075
- parseAsResourceUrl(expression: string): (context: any, locals: any) => any;
2076
- parseAsUrl(expression: string): (context: any, locals: any) => any;
2077
- trustAs(type: string, value: any): any;
2078
- trustAsHtml(value: any): any;
2079
- trustAsJs(value: any): any;
2080
- trustAsResourceUrl(value: any): any;
2081
- trustAsUrl(value: any): any;
2082
- isEnabled(): boolean;
2083
- }
2084
-
2085
- ///////////////////////////////////////////////////////////////////////////
2086
- // SCEProvider
2087
- // see http://docs.angularjs.org/api/ng/provider/$sceProvider
2088
- ///////////////////////////////////////////////////////////////////////////
2089
- interface ISCEProvider extends IServiceProvider {
2090
- enabled(value: boolean): void;
2091
- }
2092
-
2093
- ///////////////////////////////////////////////////////////////////////////
2094
- // SCEDelegateService
2095
- // see http://docs.angularjs.org/api/ng/service/$sceDelegate
2096
- ///////////////////////////////////////////////////////////////////////////
2097
- interface ISCEDelegateService {
2098
- getTrusted(type: string, mayBeTrusted: any): any;
2099
- trustAs(type: string, value: any): any;
2100
- valueOf(value: any): any;
2101
- }
2102
-
2103
- ///////////////////////////////////////////////////////////////////////////
2104
- // SCEDelegateProvider
2105
- // see http://docs.angularjs.org/api/ng/provider/$sceDelegateProvider
2106
- ///////////////////////////////////////////////////////////////////////////
2107
- interface ISCEDelegateProvider extends IServiceProvider {
2108
- /** @deprecated since 1.8.1 */
2109
- resourceUrlBlacklist(): any[];
2110
- /** @deprecated since 1.8.1 */
2111
- resourceUrlBlacklist(bannedList: any[]): void;
2112
- bannedResourceUrlList(): any[];
2113
- bannedResourceUrlList(bannedList: any[]): void;
2114
- /** @deprecated since 1.8.1 */
2115
- resourceUrlWhitelist(): any[];
2116
- /** @deprecated since 1.8.1 */
2117
- resourceUrlWhitelist(trustedList: any[]): void;
2118
- trustedResourceUrlList(): any[];
2119
- trustedResourceUrlList(trustedList: any[]): void;
2120
- }
2121
-
2122
- /**
2123
- * $templateRequest service
2124
- * see http://docs.angularjs.org/api/ng/service/$templateRequest
2125
- */
2126
- interface ITemplateRequestService {
2127
- /**
2128
- * Downloads a template using $http and, upon success, stores the
2129
- * contents inside of $templateCache.
2130
- *
2131
- * If the HTTP request fails or the response data of the HTTP request is
2132
- * empty then a $compile error will be thrown (unless
2133
- * {ignoreRequestError} is set to true).
2134
- *
2135
- * @param tpl The template URL.
2136
- * @param ignoreRequestError Whether or not to ignore the exception
2137
- * when the request fails or the template is
2138
- * empty.
2139
- *
2140
- * @return A promise whose value is the template content.
2141
- */
2142
- (tpl: string, ignoreRequestError?: boolean): IPromise<string>;
2143
- /**
2144
- * total amount of pending template requests being downloaded.
2145
- */
2146
- totalPendingRequests: number;
2147
- }
2148
-
2149
- ///////////////////////////////////////////////////////////////////////////
2150
- // Component
2151
- // see http://angularjs.blogspot.com.br/2015/11/angularjs-15-beta2-and-14-releases.html
2152
- // and http://toddmotto.com/exploring-the-angular-1-5-component-method/
2153
- ///////////////////////////////////////////////////////////////////////////
2154
- /**
2155
- * Component definition object (a simplified directive definition object)
2156
- */
2157
- interface IComponentOptions {
2158
- /**
2159
- * Controller constructor function that should be associated with newly created scope or the name of a registered
2160
- * controller if passed as a string. Empty function by default.
2161
- * Use the array form to define dependencies (necessary if strictDi is enabled and you require dependency injection)
2162
- */
2163
- controller?: string | Injectable<IControllerConstructor> | undefined;
2164
- /**
2165
- * An identifier name for a reference to the controller. If present, the controller will be published to its scope under
2166
- * the specified name. If not present, this will default to '$ctrl'.
2167
- */
2168
- controllerAs?: string | undefined;
2169
- /**
2170
- * html template as a string or a function that returns an html template as a string which should be used as the
2171
- * contents of this component. Empty string by default.
2172
- * If template is a function, then it is injected with the following locals:
2173
- * $element - Current element
2174
- * $attrs - Current attributes object for the element
2175
- * Use the array form to define dependencies (necessary if strictDi is enabled and you require dependency injection)
2176
- */
2177
- template?: string | Injectable<(...args: any[]) => string> | undefined;
2178
- /**
2179
- * Path or function that returns a path to an html template that should be used as the contents of this component.
2180
- * If templateUrl is a function, then it is injected with the following locals:
2181
- * $element - Current element
2182
- * $attrs - Current attributes object for the element
2183
- * Use the array form to define dependencies (necessary if strictDi is enabled and you require dependency injection)
2184
- */
2185
- templateUrl?: string | Injectable<(...args: any[]) => string> | undefined;
2186
- /**
2187
- * Define DOM attribute binding to component properties. Component properties are always bound to the component
2188
- * controller and not to the scope.
2189
- */
2190
- bindings?: { [boundProperty: string]: string } | undefined;
2191
- /**
2192
- * Whether transclusion is enabled. Disabled by default.
2193
- */
2194
- transclude?: boolean | { [slot: string]: string } | undefined;
2195
- /**
2196
- * Requires the controllers of other directives and binds them to this component's controller.
2197
- * The object keys specify the property names under which the required controllers (object values) will be bound.
2198
- * Note that the required controllers will not be available during the instantiation of the controller,
2199
- * but they are guaranteed to be available just before the $onInit method is executed!
2200
- */
2201
- require?: { [controller: string]: string } | undefined;
2202
- }
2203
-
2204
- type IControllerConstructor =
2205
- | (new (...args: any[]) => IController) // Instead of classes, plain functions are often used as controller constructors, especially in examples.
2206
- | ((...args: any[]) => void | IController);
2207
-
2208
- /**
2209
- * Directive controllers have a well-defined lifecycle. Each controller can implement "lifecycle hooks". These are methods that
2210
- * will be called by Angular at certain points in the life cycle of the directive.
2211
- * https://docs.angularjs.org/api/ng/service/$compile#life-cycle-hooks
2212
- * https://docs.angularjs.org/guide/component
2213
- */
2214
- interface IController {
2215
- /**
2216
- * Called on each controller after all the controllers on an element have been constructed and had their bindings
2217
- * initialized (and before the pre & post linking functions for the directives on this element). This is a good
2218
- * place to put initialization code for your controller.
2219
- */
2220
- $onInit?(): void;
2221
- /**
2222
- * Called on each turn of the digest cycle. Provides an opportunity to detect and act on changes.
2223
- * Any actions that you wish to take in response to the changes that you detect must be invoked from this hook;
2224
- * implementing this has no effect on when `$onChanges` is called. For example, this hook could be useful if you wish
2225
- * to perform a deep equality check, or to check a `Dat`e object, changes to which would not be detected by Angular's
2226
- * change detector and thus not trigger `$onChanges`. This hook is invoked with no arguments; if detecting changes,
2227
- * you must store the previous value(s) for comparison to the current values.
2228
- */
2229
- $doCheck?(): void;
2230
- /**
2231
- * Called whenever one-way bindings are updated. The onChangesObj is a hash whose keys are the names of the bound
2232
- * properties that have changed, and the values are an {@link IChangesObject} object of the form
2233
- * { currentValue, previousValue, isFirstChange() }. Use this hook to trigger updates within a component such as
2234
- * cloning the bound value to prevent accidental mutation of the outer value.
2235
- */
2236
- $onChanges?(onChangesObj: IOnChangesObject): void;
2237
- /**
2238
- * Called on a controller when its containing scope is destroyed. Use this hook for releasing external resources,
2239
- * watches and event handlers.
2240
- */
2241
- $onDestroy?(): void;
2242
- /**
2243
- * Called after this controller's element and its children have been linked. Similar to the post-link function this
2244
- * hook can be used to set up DOM event handlers and do direct DOM manipulation. Note that child elements that contain
2245
- * templateUrl directives will not have been compiled and linked since they are waiting for their template to load
2246
- * asynchronously and their own compilation and linking has been suspended until that occurs. This hook can be considered
2247
- * analogous to the ngAfterViewInit and ngAfterContentInit hooks in Angular 2. Since the compilation process is rather
2248
- * different in Angular 1 there is no direct mapping and care should be taken when upgrading.
2249
- */
2250
- $postLink?(): void;
2251
-
2252
- // IController implementations frequently do not implement any of its methods.
2253
- // A string indexer indicates to TypeScript not to issue a weak type error in this case.
2254
- [s: string]: any;
2255
- }
2256
-
2257
- /**
2258
- * Interface for the $onInit lifecycle hook
2259
- * https://docs.angularjs.org/api/ng/service/$compile#life-cycle-hooks
2260
- */
2261
- interface IOnInit {
2262
- /**
2263
- * Called on each controller after all the controllers on an element have been constructed and had their bindings
2264
- * initialized (and before the pre & post linking functions for the directives on this element). This is a good
2265
- * place to put initialization code for your controller.
2266
- */
2267
- $onInit(): void;
2268
- }
2269
-
2270
- /**
2271
- * Interface for the $doCheck lifecycle hook
2272
- * https://docs.angularjs.org/api/ng/service/$compile#life-cycle-hooks
2273
- */
2274
- interface IDoCheck {
2275
- /**
2276
- * Called on each turn of the digest cycle. Provides an opportunity to detect and act on changes.
2277
- * Any actions that you wish to take in response to the changes that you detect must be invoked from this hook;
2278
- * implementing this has no effect on when `$onChanges` is called. For example, this hook could be useful if you wish
2279
- * to perform a deep equality check, or to check a `Dat`e object, changes to which would not be detected by Angular's
2280
- * change detector and thus not trigger `$onChanges`. This hook is invoked with no arguments; if detecting changes,
2281
- * you must store the previous value(s) for comparison to the current values.
2282
- */
2283
- $doCheck(): void;
2284
- }
2285
-
2286
- /**
2287
- * Interface for the $onChanges lifecycle hook
2288
- * https://docs.angularjs.org/api/ng/service/$compile#life-cycle-hooks
2289
- */
2290
- interface IOnChanges {
2291
- /**
2292
- * Called whenever one-way bindings are updated. The onChangesObj is a hash whose keys are the names of the bound
2293
- * properties that have changed, and the values are an {@link IChangesObject} object of the form
2294
- * { currentValue, previousValue, isFirstChange() }. Use this hook to trigger updates within a component such as
2295
- * cloning the bound value to prevent accidental mutation of the outer value.
2296
- */
2297
- $onChanges(onChangesObj: IOnChangesObject): void;
2298
- }
2299
-
2300
- /**
2301
- * Interface for the $onDestroy lifecycle hook
2302
- * https://docs.angularjs.org/api/ng/service/$compile#life-cycle-hooks
2303
- */
2304
- interface IOnDestroy {
2305
- /**
2306
- * Called on a controller when its containing scope is destroyed. Use this hook for releasing external resources,
2307
- * watches and event handlers.
2308
- */
2309
- $onDestroy(): void;
2310
- }
2311
-
2312
- /**
2313
- * Interface for the $postLink lifecycle hook
2314
- * https://docs.angularjs.org/api/ng/service/$compile#life-cycle-hooks
2315
- */
2316
- interface IPostLink {
2317
- /**
2318
- * Called after this controller's element and its children have been linked. Similar to the post-link function this
2319
- * hook can be used to set up DOM event handlers and do direct DOM manipulation. Note that child elements that contain
2320
- * templateUrl directives will not have been compiled and linked since they are waiting for their template to load
2321
- * asynchronously and their own compilation and linking has been suspended until that occurs. This hook can be considered
2322
- * analogous to the ngAfterViewInit and ngAfterContentInit hooks in Angular 2. Since the compilation process is rather
2323
- * different in Angular 1 there is no direct mapping and care should be taken when upgrading.
2324
- */
2325
- $postLink(): void;
2326
- }
2327
-
2328
- interface IOnChangesObject {
2329
- [property: string]: IChangesObject<any>;
2330
- }
2331
-
2332
- interface IChangesObject<T> {
2333
- currentValue: T;
2334
- previousValue: T;
2335
- isFirstChange(): boolean;
2336
- }
2337
-
2338
- ///////////////////////////////////////////////////////////////////////////
2339
- // Directive
2340
- // see http://docs.angularjs.org/api/ng/provider/$compileProvider#directive
2341
- // and http://docs.angularjs.org/guide/directive
2342
- ///////////////////////////////////////////////////////////////////////////
2343
-
2344
- type IDirectiveController =
2345
- | IController
2346
- | IController[]
2347
- | { [key: string]: IController };
2348
-
2349
- interface IDirectiveFactory<
2350
- TScope extends IScope = IScope,
2351
- TElement extends JQLite = JQLite,
2352
- TAttributes extends IAttributes = IAttributes,
2353
- TController extends IDirectiveController = IController,
2354
- > {
2355
- (
2356
- ...args: any[]
2357
- ):
2358
- | IDirective<TScope, TElement, TAttributes, TController>
2359
- | IDirectiveLinkFn<TScope, TElement, TAttributes, TController>;
2360
- }
2361
-
2362
- interface IDirectiveLinkFn<
2363
- TScope extends IScope = IScope,
2364
- TElement extends JQLite = JQLite,
2365
- TAttributes extends IAttributes = IAttributes,
2366
- TController extends IDirectiveController = IController,
2367
- > {
2368
- (
2369
- scope: TScope,
2370
- instanceElement: TElement,
2371
- instanceAttributes: TAttributes,
2372
- controller?: TController,
2373
- transclude?: ITranscludeFunction,
2374
- ): void;
2375
- }
2376
-
2377
- interface IDirectivePrePost<
2378
- TScope extends IScope = IScope,
2379
- TElement extends JQLite = JQLite,
2380
- TAttributes extends IAttributes = IAttributes,
2381
- TController extends IDirectiveController = IController,
2382
- > {
2383
- pre?:
2384
- | IDirectiveLinkFn<TScope, TElement, TAttributes, TController>
2385
- | undefined;
2386
- post?:
2387
- | IDirectiveLinkFn<TScope, TElement, TAttributes, TController>
2388
- | undefined;
2389
- }
2390
-
2391
- interface IDirectiveCompileFn<
2392
- TScope extends IScope = IScope,
2393
- TElement extends JQLite = JQLite,
2394
- TAttributes extends IAttributes = IAttributes,
2395
- TController extends IDirectiveController = IController,
2396
- > {
2397
- (
2398
- templateElement: TElement,
2399
- templateAttributes: TAttributes,
2400
- /**
2401
- * @deprecated
2402
- * Note: The transclude function that is passed to the compile function is deprecated,
2403
- * as it e.g. does not know about the right outer scope. Please use the transclude function
2404
- * that is passed to the link function instead.
2405
- */
2406
- transclude: ITranscludeFunction,
2407
- ):
2408
- | void
2409
- | IDirectiveLinkFn<TScope, TElement, TAttributes, TController>
2410
- | IDirectivePrePost<TScope, TElement, TAttributes, TController>;
2411
- }
2412
-
2413
- interface IDirective<
2414
- TScope extends IScope = IScope,
2415
- TElement extends JQLite = JQLite,
2416
- TAttributes extends IAttributes = IAttributes,
2417
- TController extends IDirectiveController = IController,
2418
- > {
2419
- compile?:
2420
- | IDirectiveCompileFn<TScope, TElement, TAttributes, TController>
2421
- | undefined;
2422
- controller?: string | Injectable<IControllerConstructor> | undefined;
2423
- controllerAs?: string | undefined;
2424
- /**
2425
- * Deprecation warning: although bindings for non-ES6 class controllers are currently bound to this before
2426
- * the controller constructor is called, this use is now deprecated. Please place initialization code that
2427
- * relies upon bindings inside a $onInit method on the controller, instead.
2428
- */
2429
- bindToController?:
2430
- | boolean
2431
- | { [boundProperty: string]: string }
2432
- | undefined;
2433
- link?:
2434
- | IDirectiveLinkFn<TScope, TElement, TAttributes, TController>
2435
- | IDirectivePrePost<TScope, TElement, TAttributes, TController>
2436
- | undefined;
2437
- multiElement?: boolean | undefined;
2438
- priority?: number | undefined;
2439
- /**
2440
- * @deprecated
2441
- */
2442
- replace?: boolean | undefined;
2443
- require?: string | string[] | { [controller: string]: string } | undefined;
2444
- restrict?: string | undefined;
2445
- scope?: boolean | { [boundProperty: string]: string } | undefined;
2446
- template?:
2447
- | string
2448
- | ((tElement: TElement, tAttrs: TAttributes) => string)
2449
- | undefined;
2450
- templateNamespace?: string | undefined;
2451
- templateUrl?:
2452
- | string
2453
- | ((tElement: TElement, tAttrs: TAttributes) => string)
2454
- | undefined;
2455
- terminal?: boolean | undefined;
2456
- transclude?: boolean | "element" | { [slot: string]: string } | undefined;
2457
- }
2458
-
2459
- /**
2460
- * These interfaces are kept for compatibility with older versions of these type definitions.
2461
- * Actually, Angular doesn't create a special subclass of jQuery objects. It extends jQuery.prototype
2462
- * like jQuery plugins do, that's why all jQuery objects have these Angular-specific methods, not
2463
- * only those returned from angular.element.
2464
- * See: http://docs.angularjs.org/api/angular.element
2465
- */
2466
- interface IAugmentedJQueryStatic extends JQueryStatic {}
2467
- interface IAugmentedJQuery extends JQLite {}
2468
-
2469
- /**
2470
- * Same as IController. Keeping it for compatibility with older versions of these type definitions.
2471
- */
2472
- interface IComponentController extends IController {}
2473
-
2474
- ///////////////////////////////////////////////////////////////////////////
2475
- // AUTO module (angular.js)
2476
- ///////////////////////////////////////////////////////////////////////////
2477
- namespace auto {
2478
- ///////////////////////////////////////////////////////////////////////
2479
- // InjectorService
2480
- // see http://docs.angularjs.org/api/AUTO.$injector
2481
- ///////////////////////////////////////////////////////////////////////
2482
- interface IInjectorService {
2483
- annotate(fn: Function, strictDi?: boolean): string[];
2484
- annotate(inlineAnnotatedFunction: any[]): string[];
2485
- get<T>(name: string, caller?: string): T;
2486
- get(name: "$anchorScroll"): IAnchorScrollService;
2487
- get(name: "$cacheFactory"): ICacheFactoryService;
2488
- get(name: "$compile"): ICompileService;
2489
- get(name: "$controller"): IControllerService;
2490
- get(name: "$document"): IDocumentService;
2491
- get(name: "$exceptionHandler"): IExceptionHandlerService;
2492
- get(name: "$filter"): IFilterService;
2493
- get(name: "$http"): IHttpService;
2494
- get(name: "$httpBackend"): IHttpBackendService;
2495
- get(name: "$httpParamSerializer"): IHttpParamSerializer;
2496
- get(name: "$httpParamSerializerJQLike"): IHttpParamSerializer;
2497
- get(name: "$interpolate"): IInterpolateService;
2498
- get(name: "$interval"): IIntervalService;
2499
- get(name: "$locale"): ILocaleService;
2500
- get(name: "$location"): ILocationService;
2501
- get(name: "$log"): ILogService;
2502
- get(name: "$parse"): IParseService;
2503
- get(name: "$q"): IQService;
2504
- get(name: "$rootElement"): IRootElementService;
2505
- get(name: "$rootScope"): IRootScopeService;
2506
- get(name: "$sce"): ISCEService;
2507
- get(name: "$sceDelegate"): ISCEDelegateService;
2508
- get(name: "$templateCache"): ITemplateCacheService;
2509
- get(name: "$templateRequest"): ITemplateRequestService;
2510
- get(name: "$timeout"): ITimeoutService;
2511
- get(name: "$window"): IWindowService;
2512
- get<T>(name: "$xhrFactory"): IXhrFactory<T>;
2513
- has(name: string): boolean;
2514
- instantiate<T>(
2515
- typeConstructor: { new (...args: any[]): T },
2516
- locals?: any,
2517
- ): T;
2518
- invoke<T = any>(
2519
- func: Injectable<Function | ((...args: any[]) => T)>,
2520
- context?: any,
2521
- locals?: any,
2522
- ): T;
2523
- /**
2524
- * Add the specified modules to the current injector.
2525
- * This method will add each of the injectables to the injector and execute all of the config and run blocks for each module passed to the method.
2526
- * @param modules A module, module name or annotated injection function.
2527
- */
2528
- loadNewModules(
2529
- modules: Array<IModule | string | Injectable<(...args: any[]) => void>>,
2530
- ): void;
2531
- /** An object map of all the modules that have been loaded into the injector. */
2532
- modules: { [moduleName: string]: IModule };
2533
- strictDi: boolean;
2534
- }
2535
-
2536
- ///////////////////////////////////////////////////////////////////////
2537
- // ProvideService
2538
- // see http://docs.angularjs.org/api/AUTO.$provide
2539
- ///////////////////////////////////////////////////////////////////////
2540
- interface IProvideService {
2541
- // Documentation says it returns the registered instance, but actual
2542
- // implementation does not return anything.
2543
- // constant(name: string, value: any): any;
2544
- /**
2545
- * Register a constant service, such as a string, a number, an array, an object or a function, with the $injector. Unlike value it can be injected into a module configuration function (see config) and it cannot be overridden by an Angular decorator.
2546
- *
2547
- * @param name The name of the constant.
2548
- * @param value The constant value.
2549
- */
2550
- constant(name: string, value: any): void;
2551
-
2552
- /**
2553
- * Register a service decorator with the $injector. A service decorator intercepts the creation of a service, allowing it to override or modify the behaviour of the service. The object returned by the decorator may be the original service, or a new service object which replaces or wraps and delegates to the original service.
2554
- *
2555
- * @param name The name of the service to decorate.
2556
- * @param decorator This function will be invoked when the service needs to be instantiated and should return the decorated service instance. The function is called using the injector.invoke method and is therefore fully injectable. Local injection arguments:
2557
- *
2558
- * $delegate - The original service instance, which can be monkey patched, configured, decorated or delegated to.
2559
- */
2560
- decorator(name: string, decorator: Function): void;
2561
- /**
2562
- * Register a service decorator with the $injector. A service decorator intercepts the creation of a service, allowing it to override or modify the behaviour of the service. The object returned by the decorator may be the original service, or a new service object which replaces or wraps and delegates to the original service.
2563
- *
2564
- * @param name The name of the service to decorate.
2565
- * @param inlineAnnotatedFunction This function will be invoked when the service needs to be instantiated and should return the decorated service instance. The function is called using the injector.invoke method and is therefore fully injectable. Local injection arguments:
2566
- *
2567
- * $delegate - The original service instance, which can be monkey patched, configured, decorated or delegated to.
2568
- */
2569
- decorator(name: string, inlineAnnotatedFunction: any[]): void;
2570
- factory(name: string, serviceFactoryFunction: Function): IServiceProvider;
2571
- factory(name: string, inlineAnnotatedFunction: any[]): IServiceProvider;
2572
- provider(name: string, provider: IServiceProvider): IServiceProvider;
2573
- provider(
2574
- name: string,
2575
- serviceProviderConstructor: Function,
2576
- ): IServiceProvider;
2577
- service(name: string, constructor: Function): IServiceProvider;
2578
- service(name: string, inlineAnnotatedFunction: any[]): IServiceProvider;
2579
- value(name: string, value: any): IServiceProvider;
2580
- }
2581
- }
2582
-
2583
- /**
2584
- * $http params serializer that converts objects to strings
2585
- * see https://docs.angularjs.org/api/ng/service/$httpParamSerializer
2586
- */
2587
- interface IHttpParamSerializer {
2588
- (obj: Object): string;
2589
- }
2590
-
2591
- interface IFilterFunction extends Function {
2592
- /**
2593
- * By default, filters are only run once the input value changes. By marking the filter as `$stateful`, the filter will be run on every `$digest` to update the output. **This is strongly discouraged.**
2594
- * See https://docs.angularjs.org/guide/filter#stateful-filters
2595
- */
2596
- $stateful?: boolean | undefined;
2597
- }
2598
- type FilterFactory = (...I: any[]) => IFilterFunction;
2599
- }