@angular-wave/angular.ts 0.7.7 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (376) hide show
  1. package/@types/animations/raf-scheduler.d.ts +2 -2
  2. package/@types/animations/shared.d.ts +0 -1
  3. package/@types/core/compile/attributes.d.ts +3 -3
  4. package/@types/core/compile/compile.d.ts +1 -1
  5. package/@types/core/di/injector.d.ts +0 -1
  6. package/@types/core/di/internal-injector.d.ts +1 -0
  7. package/@types/core/di/ng-module.d.ts +5 -0
  8. package/@types/core/filter/filter.d.ts +11 -13
  9. package/@types/core/parse/parse.d.ts +6 -7
  10. package/@types/core/sanitize/sanitize-uri.d.ts +3 -6
  11. package/@types/core/scope/scope.d.ts +1 -1
  12. package/@types/directive/attrs/attrs.d.ts +7 -1
  13. package/@types/directive/bind/bind.d.ts +2 -1
  14. package/@types/directive/events/events.d.ts +9 -3
  15. package/@types/directive/http/http.d.ts +6 -2
  16. package/@types/directive/include/include.d.ts +2 -2
  17. package/@types/directive/input/input.d.ts +2 -12
  18. package/@types/directive/messages/messages.d.ts +9 -48
  19. package/@types/directive/model/model.d.ts +3 -3
  20. package/@types/directive/options/options.d.ts +13 -20
  21. package/@types/directive/switch/switch.d.ts +1 -0
  22. package/@types/directive/transclude/transclude.d.ts +10 -6
  23. package/@types/index.d.ts +1 -1
  24. package/@types/interface.d.ts +56 -18
  25. package/@types/{public.d.ts → ng.d.ts} +2 -2
  26. package/@types/router/directives/view-directive.d.ts +2 -19
  27. package/@types/router/{common → glob}/glob.d.ts +5 -1
  28. package/@types/router/globals.d.ts +2 -3
  29. package/@types/router/path/path-utils.d.ts +8 -11
  30. package/@types/router/state/interface.d.ts +1 -1
  31. package/@types/router/state/state-object.d.ts +1 -1
  32. package/@types/router/state/state-registry.d.ts +1 -2
  33. package/@types/router/state/state-service.d.ts +8 -7
  34. package/@types/router/state-filters.d.ts +24 -2
  35. package/@types/router/transition/transition.d.ts +12 -15
  36. package/@types/router/url/url-matcher.d.ts +3 -3
  37. package/@types/router/url/url-rule.d.ts +1 -0
  38. package/@types/router/url/url-rules.d.ts +26 -6
  39. package/@types/router/url/url-service.d.ts +30 -42
  40. package/@types/services/anchor-scroll.d.ts +1 -1
  41. package/@types/{core → services/exception}/exception-handler.d.ts +4 -4
  42. package/@types/{core/error-handler.d.ts → services/exception/interface.d.ts} +1 -1
  43. package/@types/services/http/http.d.ts +48 -3
  44. package/@types/services/http/interface.d.ts +2 -2
  45. package/@types/services/http-backend/http-backend.d.ts +49 -44
  46. package/@types/services/location/interface.d.ts +63 -0
  47. package/@types/services/location/location.d.ts +330 -0
  48. package/@types/{core → services}/sce/sce.d.ts +1 -1
  49. package/@types/services/template-cache/interface.d.ts +8 -2
  50. package/@types/services/template-cache/template-cache.d.ts +1 -1
  51. package/@types/services/template-request.d.ts +1 -1
  52. package/@types/shared/cache.d.ts +0 -2
  53. package/@types/shared/common.d.ts +0 -2
  54. package/@types/shared/dom.d.ts +6 -0
  55. package/@types/shared/interface.d.ts +0 -4
  56. package/@types/{router/common → shared}/queue.d.ts +2 -2
  57. package/@types/shared/test-utils.d.ts +1 -0
  58. package/@types/shared/url-utils/interface.d.ts +46 -0
  59. package/@types/shared/url-utils/url-utils.d.ts +64 -0
  60. package/@types/shared/utils.d.ts +44 -6
  61. package/Makefile +8 -4
  62. package/dist/angular-ts.esm.js +1889 -2199
  63. package/dist/angular-ts.umd.js +1889 -2199
  64. package/dist/angular-ts.umd.min.js +1 -1
  65. package/docs/assets/scss/index.scss +23 -0
  66. package/docs/content/_index.md +9 -8
  67. package/docs/content/docs/_index.md +1 -1
  68. package/docs/content/docs/directive/app.md +1 -1
  69. package/docs/content/docs/directive/bind.md +10 -8
  70. package/docs/content/docs/directive/blur.md +1 -1
  71. package/docs/content/docs/directive/channel.md +2 -2
  72. package/docs/content/docs/directive/class-even.md +1 -1
  73. package/docs/content/docs/directive/class-odd.md +1 -1
  74. package/docs/content/docs/directive/class.md +1 -1
  75. package/docs/content/docs/directive/click.md +1 -1
  76. package/docs/content/docs/directive/copy.md +1 -1
  77. package/docs/content/docs/directive/cut.md +1 -1
  78. package/docs/content/docs/directive/dblclick.md +1 -1
  79. package/docs/content/docs/directive/focus.md +1 -1
  80. package/docs/content/docs/directive/get.md +203 -0
  81. package/docs/content/docs/directive/keydown.md +1 -1
  82. package/docs/content/docs/directive/keyup.md +1 -1
  83. package/docs/content/docs/directive/load.md +1 -1
  84. package/docs/content/docs/directive/mousedown.md +1 -1
  85. package/docs/content/docs/directive/mouseenter.md +1 -1
  86. package/docs/content/docs/directive/mouseleave.md +1 -1
  87. package/docs/content/docs/directive/mousemove.md +1 -1
  88. package/docs/content/docs/directive/mouseout.md +1 -1
  89. package/docs/content/docs/directive/mouseover.md +1 -1
  90. package/docs/content/docs/directive/mouseup.md +1 -1
  91. package/docs/content/docs/directive/non-bindable.md +28 -0
  92. package/docs/content/docs/provider/locationProvider.md +26 -0
  93. package/docs/content/docs/provider/templateCacheProvider.md +66 -1
  94. package/docs/content/docs/service/location.md +57 -0
  95. package/docs/content/docs/service/templateCache.md +2 -2
  96. package/docs/content/docs/service/url.md +5 -0
  97. package/docs/layouts/partials/hooks/head-end.html +1 -1
  98. package/docs/layouts/shortcodes/showcss.html +2 -0
  99. package/docs/layouts/shortcodes/version.html +1 -0
  100. package/docs/static/examples/counter/counter-test.html +0 -4
  101. package/docs/static/examples/eventbus/eventbus-test.html +0 -4
  102. package/docs/static/examples/ng-bind/ng-bind.html +2 -2
  103. package/docs/static/examples/ng-non-bindable/ng-non-bindable-test.html +13 -0
  104. package/docs/static/examples/ng-non-bindable/ng-non-bindable.html +3 -0
  105. package/docs/static/examples/ng-non-bindable/ng-non-bindable.test.js +11 -0
  106. package/docs/static/typedoc/assets/hierarchy.js +1 -1
  107. package/docs/static/typedoc/assets/highlight.css +6 -6
  108. package/docs/static/typedoc/assets/navigation.js +1 -1
  109. package/docs/static/typedoc/assets/search.js +1 -1
  110. package/docs/static/typedoc/classes/Location.html +55 -0
  111. package/docs/static/typedoc/classes/LocationProvider.html +20 -0
  112. package/docs/static/typedoc/classes/NgModule.html +32 -0
  113. package/docs/static/typedoc/classes/TemplateCacheProvider.html +1 -1
  114. package/docs/static/typedoc/hierarchy.html +1 -1
  115. package/docs/static/typedoc/index.html +1 -1
  116. package/docs/static/typedoc/interfaces/DefaultPorts.html +5 -0
  117. package/docs/static/typedoc/interfaces/Directive.html +5 -4
  118. package/docs/static/typedoc/interfaces/Html5Mode.html +23 -0
  119. package/docs/static/typedoc/interfaces/HttpProviderDefaults.html +1 -1
  120. package/docs/static/typedoc/interfaces/HttpResponse.html +2 -3
  121. package/docs/static/typedoc/interfaces/Provider.html +16 -10
  122. package/docs/static/typedoc/interfaces/RequestConfig.html +1 -1
  123. package/docs/static/typedoc/interfaces/RequestShortcutConfig.html +1 -1
  124. package/docs/static/typedoc/interfaces/TemplateCache.html +7 -0
  125. package/docs/static/typedoc/interfaces/UrlParts.html +9 -0
  126. package/docs/static/typedoc/types/AnnotatedDirectiveFactory.html +1 -0
  127. package/docs/static/typedoc/types/AnnotatedFactory.html +1 -1
  128. package/docs/static/typedoc/types/DirectiveFactory.html +1 -2
  129. package/docs/static/typedoc/types/DirectiveFactoryFn.html +1 -0
  130. package/docs/static/typedoc/types/Expression.html +1 -1
  131. package/docs/static/typedoc/types/HttpResponseStatus.html +1 -0
  132. package/docs/static/typedoc/types/{TemplateCache.html → SwapModeType.html} +1 -1
  133. package/docs/static/typedoc/types/UrlChangeListener.html +5 -0
  134. package/docs/static/typedoc/variables/SwapMode.html +11 -0
  135. package/docs/static/version.js +13 -0
  136. package/docs/test-results/.last-run.json +4 -0
  137. package/docs/test-results/static-examples-counter-counter-counter-example/error-context.md +50 -0
  138. package/legacy.d.ts +0 -10
  139. package/package.json +1 -3
  140. package/src/{loader.js → angular.js} +5 -10
  141. package/src/angular.spec.js +189 -21
  142. package/src/animations/animate-children-directive.js +2 -2
  143. package/src/animations/animate-css.js +17 -18
  144. package/src/animations/animate.spec.js +1 -1
  145. package/src/animations/raf-scheduler.js +1 -1
  146. package/src/animations/shared.js +2 -12
  147. package/src/binding.spec.js +1 -1
  148. package/src/core/compile/attributes.js +1 -1
  149. package/src/core/compile/compile.js +7 -10
  150. package/src/core/compile/compile.spec.js +1 -1
  151. package/src/core/controller/controller.spec.js +1 -1
  152. package/src/core/controller/controller.test.js +1 -0
  153. package/src/core/di/injector.js +11 -25
  154. package/src/core/di/injector.spec.js +2 -2
  155. package/src/core/di/injector.test.js +2 -2
  156. package/src/core/di/internal-injector.js +7 -7
  157. package/src/core/di/ng-module.js +12 -27
  158. package/src/core/filter/filter.js +28 -28
  159. package/src/core/filter/filter.spec.js +1 -1
  160. package/src/core/filter/filter.test.js +1 -0
  161. package/src/core/interpolate/interpolate.js +4 -6
  162. package/src/core/interpolate/interpolate.spec.js +1 -1
  163. package/src/core/interpolate/interpolate.test.js +1 -0
  164. package/src/core/parse/ast/ast.spec.js +1 -1
  165. package/src/core/parse/ast/ast.test.js +1 -1
  166. package/src/core/parse/interpreter.js +32 -38
  167. package/src/core/parse/lexer/lexer.spec.js +1 -1
  168. package/src/core/parse/parse.js +150 -146
  169. package/src/core/parse/parse.spec.js +17 -16
  170. package/src/core/prop.spec.js +1 -1
  171. package/src/core/root-element.spec.js +1 -1
  172. package/src/core/sanitize/sanitize-uri.js +3 -3
  173. package/src/core/scope/scope.js +12 -13
  174. package/src/core/scope/scope.spec.js +3 -4
  175. package/src/directive/aria/aria.spec.js +1 -1
  176. package/src/directive/aria/aria.test.js +1 -0
  177. package/src/directive/attrs/attrs.js +7 -4
  178. package/src/directive/attrs/attrs.spec.js +1 -1
  179. package/src/directive/attrs/attrs.test.js +1 -0
  180. package/src/directive/attrs/boolean.spec.js +1 -1
  181. package/src/directive/attrs/boolean.test.js +1 -0
  182. package/src/directive/attrs/element-style.spec.js +1 -1
  183. package/src/directive/attrs/element-style.test.js +1 -0
  184. package/src/directive/attrs/src.spec.js +1 -1
  185. package/src/directive/attrs/src.test.js +1 -0
  186. package/src/directive/bind/bind-html.spec.js +1 -1
  187. package/src/directive/bind/bind.js +1 -0
  188. package/src/directive/bind/bind.spec.js +1 -1
  189. package/src/directive/bind/bind.test.js +1 -0
  190. package/src/directive/channel/channel.spec.js +1 -1
  191. package/src/directive/channel/channel.test.js +1 -0
  192. package/src/directive/class/class.spec.js +1 -1
  193. package/src/directive/class/class.test.js +1 -0
  194. package/src/directive/cloak/cloak.spec.js +1 -1
  195. package/src/directive/cloak/cloak.test.js +1 -0
  196. package/src/directive/controller/controller.spec.js +1 -1
  197. package/src/directive/controller/controller.test.js +1 -0
  198. package/src/directive/events/click.spec.js +1 -1
  199. package/src/directive/events/event.spec.js +1 -1
  200. package/src/directive/events/events.js +6 -2
  201. package/src/directive/events/events.test.js +1 -0
  202. package/src/directive/form/form.js +8 -5
  203. package/src/directive/form/form.spec.js +1 -1
  204. package/src/directive/form/form.test.js +1 -0
  205. package/src/directive/http/delete.spec.js +3 -1
  206. package/src/directive/http/form-test.html +18 -0
  207. package/src/directive/http/get.spec.js +281 -4
  208. package/src/directive/http/http.js +112 -15
  209. package/src/directive/http/http.test.js +2 -2
  210. package/src/directive/http/post.spec.js +506 -9
  211. package/src/directive/http/put.spec.js +3 -1
  212. package/src/directive/if/if.spec.js +1 -1
  213. package/src/directive/include/include.js +7 -7
  214. package/src/directive/include/include.spec.js +1 -1
  215. package/src/directive/init/init.spec.js +1 -1
  216. package/src/directive/init/init.test.js +1 -0
  217. package/src/directive/input/input.js +19 -43
  218. package/src/directive/input/input.spec.js +1 -2
  219. package/src/directive/input/input.test.js +1 -0
  220. package/src/directive/messages/messages.js +4 -0
  221. package/src/directive/messages/messages.spec.js +1 -1
  222. package/src/directive/messages/messages.test.js +1 -0
  223. package/src/directive/model/model.js +14 -14
  224. package/src/directive/model/model.spec.js +1 -1
  225. package/src/directive/model/model.test.js +1 -0
  226. package/src/directive/model-options/model-option.test.js +1 -0
  227. package/src/directive/model-options/model-options.js +1 -1
  228. package/src/directive/model-options/model-options.spec.js +1 -1
  229. package/src/directive/non-bindable/non-bindable.spec.js +1 -1
  230. package/src/directive/non-bindable/non-bindable.test.js +1 -0
  231. package/src/directive/observe/observe.spec.js +1 -1
  232. package/src/directive/observe/observe.test.js +1 -0
  233. package/src/directive/on/on.spec.js +1 -1
  234. package/src/directive/on/on.test.js +1 -0
  235. package/src/directive/options/options.js +454 -464
  236. package/src/directive/options/options.spec.js +1 -1
  237. package/src/directive/options/options.test.js +1 -0
  238. package/src/directive/ref/href.spec.js +1 -1
  239. package/src/directive/ref/href.test.js +2 -0
  240. package/src/directive/ref/ref.spec.js +1 -1
  241. package/src/directive/repeat/repeat.spec.js +2 -3
  242. package/src/directive/repeat/repeat.test.js +1 -0
  243. package/src/directive/script/script.spec.js +1 -1
  244. package/src/directive/script/script.test.js +1 -0
  245. package/src/directive/select/select.js +1 -1
  246. package/src/directive/select/select.spec.js +1 -1
  247. package/src/directive/select/select.test.js +1 -0
  248. package/src/directive/setter/setter.js +12 -14
  249. package/src/directive/setter/setter.spec.js +40 -17
  250. package/src/directive/setter/setter.test.js +1 -0
  251. package/src/directive/show-hide/show-hide.spec.js +1 -1
  252. package/src/directive/show-hide/show-hide.test.js +1 -0
  253. package/src/directive/style/style.spec.js +1 -1
  254. package/src/directive/style/style.test.js +1 -0
  255. package/src/directive/switch/switch.js +1 -0
  256. package/src/directive/switch/switch.spec.js +1 -1
  257. package/src/directive/switch/switch.test.js +1 -0
  258. package/src/directive/transclude/transclude.js +87 -89
  259. package/src/directive/validators/validators.js +82 -84
  260. package/src/directive/validators/validators.spec.js +5 -4
  261. package/src/directive/validators/validators.test.js +1 -0
  262. package/src/filters/filter.spec.js +1 -1
  263. package/src/filters/filters.spec.js +1 -1
  264. package/src/filters/limit-to.js +2 -3
  265. package/src/filters/limit-to.spec.js +1 -1
  266. package/src/filters/order-by.spec.js +1 -1
  267. package/src/index.js +1 -1
  268. package/src/injection-tokens.js +6 -2
  269. package/src/interface.ts +70 -19
  270. package/src/loader.md +0 -155
  271. package/src/{public.js → ng.js} +16 -23
  272. package/src/{public.spec.js → ng.spec.js} +1 -1
  273. package/src/router/directives/state-directives.spec.js +9 -8
  274. package/src/router/directives/view-directive.js +11 -9
  275. package/src/router/directives/view-directive.spec.js +8 -9
  276. package/src/router/{common/common.html → glob/glob.html} +2 -3
  277. package/src/router/{common → glob}/glob.js +5 -0
  278. package/src/router/{common/common.test.js → glob/glob.test.js} +2 -1
  279. package/src/router/globals.js +1 -2
  280. package/src/router/path/path-utils.js +5 -0
  281. package/src/router/router-test-hashbang.html +45 -0
  282. package/src/router/services.spec.js +5 -6
  283. package/src/router/state/interface.ts +1 -1
  284. package/src/router/state/state-builder.js +3 -3
  285. package/src/router/state/state-builder.spec.js +1 -1
  286. package/src/router/state/state-object.js +1 -1
  287. package/src/router/state/state-registry.js +2 -3
  288. package/src/router/state/state-service.js +13 -10
  289. package/src/router/state/state.spec.js +23 -22
  290. package/src/router/state/state.test.js +1 -0
  291. package/src/router/state/views.js +1 -1
  292. package/src/router/state-filter.spec.js +1 -1
  293. package/src/router/state-filters.js +15 -11
  294. package/src/router/template-factory.js +5 -4
  295. package/src/router/template-factory.spec.js +1 -1
  296. package/src/router/transition/hook-registry.js +1 -1
  297. package/src/router/transition/transition-service.js +6 -5
  298. package/src/router/transition/transition.js +4 -4
  299. package/src/router/url/url-matcher.js +3 -3
  300. package/src/router/url/url-rule.js +1 -0
  301. package/src/router/url/url-rules.js +8 -5
  302. package/src/router/url/url-service.js +82 -85
  303. package/src/router/url/url-service.spec.js +55 -39
  304. package/src/router/url/url.test.js +1 -0
  305. package/src/router/view/view.js +4 -5
  306. package/src/router/view/view.spec.js +10 -12
  307. package/src/router/view/view.test.js +1 -0
  308. package/src/router/view-hook.spec.js +1 -1
  309. package/src/router/view-scroll.spec.js +1 -1
  310. package/src/services/anchor-scroll.html +2 -9
  311. package/src/services/anchor-scroll.js +6 -5
  312. package/src/{core → services/exception}/exception-handler.js +2 -2
  313. package/src/{core/error-handler.ts → services/exception/interface.ts} +1 -1
  314. package/src/services/http/http.js +11 -17
  315. package/src/services/http/http.spec.js +2 -7
  316. package/src/services/http/interface.ts +2 -2
  317. package/src/services/http/template-request.spec.js +1 -1
  318. package/src/services/http-backend/http-backend.js +53 -89
  319. package/src/services/http-backend/http-backend.spec.js +2 -6
  320. package/src/services/http-backend/http-backend.test.js +1 -0
  321. package/src/services/location/interface.ts +70 -0
  322. package/src/{core → services}/location/location.html +4 -1
  323. package/src/services/location/location.js +999 -0
  324. package/src/{core → services}/location/location.spec.js +911 -532
  325. package/src/{core → services}/location/location.test.js +2 -2
  326. package/src/services/log/log.spec.js +1 -1
  327. package/src/services/log/log.test.js +1 -0
  328. package/src/services/pubsub/pubsub.spec.js +1 -1
  329. package/src/{core → services}/sce/sce.html +1 -1
  330. package/src/{core → services}/sce/sce.js +14 -10
  331. package/src/{core → services}/sce/sce.md +2 -2
  332. package/src/{core → services}/sce/sce.spec.js +3 -4
  333. package/src/{core → services}/sce/sce.test.js +1 -1
  334. package/src/services/template-cache/interface.ts +8 -2
  335. package/src/services/template-cache/template-cache.js +3 -1
  336. package/src/services/template-cache/template-cache.spec.js +73 -1
  337. package/src/services/template-cache/template-cache.test.js +1 -0
  338. package/src/services/template-request.js +2 -1
  339. package/src/shared/cache.js +0 -2
  340. package/src/shared/common.js +0 -5
  341. package/src/shared/common.spec.js +1 -1
  342. package/src/shared/dom.js +10 -0
  343. package/src/shared/interface.ts +0 -4
  344. package/src/{router/common → shared}/queue.js +7 -7
  345. package/src/shared/shared.html +1 -0
  346. package/src/shared/shared.test.js +1 -0
  347. package/src/shared/test-utils.js +1 -0
  348. package/src/shared/url-utils/interface.ts +54 -0
  349. package/src/{core → shared}/url-utils/url-utils.html +4 -1
  350. package/src/{core → shared}/url-utils/url-utils.js +26 -47
  351. package/src/{core → shared}/url-utils/url-utils.spec.js +10 -17
  352. package/src/{core → shared}/url-utils/url-utils.test.js +1 -1
  353. package/src/shared/utils.js +60 -9
  354. package/src/shared/utils.spec.js +35 -1
  355. package/src/src.html +1 -2
  356. package/typedoc.json +0 -1
  357. package/utils/express.js +36 -2
  358. package/utils/version.cjs +23 -0
  359. package/@types/core/location/location.d.ts +0 -317
  360. package/@types/core/task-tracker-factory.d.ts +0 -76
  361. package/@types/core/url-utils/url-utils.d.ts +0 -56
  362. package/@types/router/state-provider.d.ts +0 -123
  363. package/@types/services/browser.d.ts +0 -101
  364. package/docs/static/typedoc/types/SwapInsertPosition.html +0 -2
  365. package/jsdoc.json +0 -22
  366. package/src/core/location/location.js +0 -984
  367. package/src/core/location/location.md +0 -114
  368. package/src/core/task-tracker-factory.js +0 -145
  369. package/src/core/url-utils/url-utils.md +0 -46
  370. package/src/directive/non-bindable/non-bindable.md +0 -17
  371. package/src/loader.spec.js +0 -169
  372. package/src/router/state-provider.js +0 -146
  373. package/src/services/browser.js +0 -212
  374. /package/@types/{loader.d.ts → angular.d.ts} +0 -0
  375. /package/src/router/{common → glob}/glob.spec.js +0 -0
  376. /package/src/{router/common → shared}/queue.spec.js +0 -0
@@ -1,29 +1,29 @@
1
1
  import {
2
- lowercase,
3
- uppercase,
2
+ encodeUriQuery,
3
+ encodeUriSegment,
4
+ equals,
4
5
  extend,
5
- isDefined,
6
+ fromJson,
7
+ getNodeName,
8
+ hashKey,
9
+ isArrayLike,
6
10
  isDate,
7
- isRegExp,
11
+ isDefined,
8
12
  isElement,
9
- shallowCopy,
10
- equals,
11
- isWindow,
12
- hashKey,
13
- toKeyValue,
14
- parseKeyValue,
15
13
  isError,
16
- isArrayLike,
17
- encodeUriSegment,
18
- encodeUriQuery,
19
- toJson,
20
- fromJson,
14
+ isRegExp,
15
+ isWindow,
16
+ lowercase,
21
17
  nextUid,
22
- getNodeName,
18
+ parseKeyValue,
19
+ shallowCopy,
23
20
  snakeCase,
21
+ toJson,
22
+ toKeyValue,
23
+ uppercase,
24
24
  } from "./shared/utils.js";
25
25
  import { createElementFromHTML, dealoc, startingTag } from "./shared/dom.js";
26
- import { Angular } from "./loader.js";
26
+ import { Angular } from "./angular.js";
27
27
  import { createInjector } from "./core/di/injector.js";
28
28
  import { wait } from "./shared/test-utils.js";
29
29
 
@@ -594,15 +594,16 @@ describe("angular", () => {
594
594
 
595
595
  it("should look for ngApp directive using querySelectorAll", () => {
596
596
  window.angular.module("ABC", []);
597
- const appElement = createElementFromHTML('<div ng-app="ABC"></div>');
598
- element.querySelector["[ng-app]"] = appElement;
597
+ element.querySelector["[ng-app]"] = createElementFromHTML(
598
+ '<div ng-app="ABC"></div>',
599
+ );
599
600
  window.angular.init(element);
600
601
  expect(bootstrapSpy).toHaveBeenCalled();
601
602
  });
602
603
 
603
604
  it("should bootstrap anonymously", () => {
604
- const appElement = createElementFromHTML("<div ng-app></div>");
605
- element.querySelector["[ng-app]"] = appElement;
605
+ element.querySelector["[ng-app]"] =
606
+ createElementFromHTML("<div ng-app></div>");
606
607
  window.angular.init(element);
607
608
  expect(bootstrapSpy).toHaveBeenCalled();
608
609
  });
@@ -1021,3 +1022,170 @@ describe("angular", () => {
1021
1022
  });
1022
1023
  });
1023
1024
  });
1025
+
1026
+ describe("module loader", () => {
1027
+ let angular;
1028
+ beforeEach(() => {
1029
+ angular = window.angular = new Angular();
1030
+ });
1031
+
1032
+ it("allows registering a module", () => {
1033
+ const myModule = angular.module("myModule", []);
1034
+ expect(myModule).toBeDefined();
1035
+ expect(myModule.name).toEqual("myModule");
1036
+ });
1037
+
1038
+ it("allows getting a module", () => {
1039
+ const myModule = angular.module("myModule", []);
1040
+ const gotModule = angular.module("myModule");
1041
+ expect(gotModule).toBeDefined();
1042
+ expect(gotModule).toBe(myModule);
1043
+ });
1044
+
1045
+ it("throws when trying to get a nonexistent module", () => {
1046
+ expect(() => {
1047
+ angular.module("nonexistent");
1048
+ }).toThrow();
1049
+ });
1050
+
1051
+ it("does not allow a module to be called hasOwnProperty", () => {
1052
+ expect(() => {
1053
+ angular.module("hasOwnProperty", []);
1054
+ }).toThrow();
1055
+ });
1056
+
1057
+ it("attaches the requires array to the registered module", () => {
1058
+ const myModule = angular.module("myModule", ["myOtherModule"]);
1059
+ expect(myModule.requires).toEqual(["myOtherModule"]);
1060
+ });
1061
+
1062
+ it("replaces a module when registered with same name again", () => {
1063
+ const myModule = angular.module("myModule", []);
1064
+ const myNewModule = angular.module("myModule", []);
1065
+ expect(myNewModule).not.toBe(myModule);
1066
+ });
1067
+
1068
+ it("should record calls", () => {
1069
+ const otherModule = angular.module("other", []);
1070
+ otherModule.config("otherInit");
1071
+
1072
+ const myModule = angular.module("my", ["other"], "config");
1073
+
1074
+ expect(
1075
+ myModule
1076
+ .decorator("dk", "dv")
1077
+ .provider("sk", "sv")
1078
+ .factory("fk", "fv")
1079
+ .service("a", "aa")
1080
+ .value("k", "v")
1081
+ .filter("f", "ff")
1082
+ .directive("d", "dd")
1083
+ .component("c", "cc")
1084
+ .controller("ctrl", "ccc")
1085
+ .config("init2")
1086
+ .constant("abc", 123)
1087
+ .run("runBlock"),
1088
+ ).toBe(myModule);
1089
+
1090
+ expect(myModule.requires).toEqual(["other"]);
1091
+ expect(myModule.invokeQueue).toEqual([
1092
+ ["$provide", "constant", jasmine.objectContaining(["abc", 123])],
1093
+ ["$provide", "provider", jasmine.objectContaining(["sk", "sv"])],
1094
+ ["$provide", "factory", jasmine.objectContaining(["fk", "fv"])],
1095
+ ["$provide", "service", jasmine.objectContaining(["a", "aa"])],
1096
+ ["$provide", "value", jasmine.objectContaining(["k", "v"])],
1097
+ ["$filterProvider", "register", jasmine.objectContaining(["f", "ff"])],
1098
+ ["$compileProvider", "directive", jasmine.objectContaining(["d", "dd"])],
1099
+ ["$compileProvider", "component", jasmine.objectContaining(["c", "cc"])],
1100
+ [
1101
+ "$controllerProvider",
1102
+ "register",
1103
+ jasmine.objectContaining(["ctrl", "ccc"]),
1104
+ ],
1105
+ ]);
1106
+ expect(myModule.configBlocks).toEqual([
1107
+ ["$injector", "invoke", jasmine.objectContaining(["config"])],
1108
+ ["$provide", "decorator", jasmine.objectContaining(["dk", "dv"])],
1109
+ ["$injector", "invoke", jasmine.objectContaining(["init2"])],
1110
+ ]);
1111
+ expect(myModule.runBlocks).toEqual(["runBlock"]);
1112
+ });
1113
+
1114
+ it("should not throw error when `module.decorator` is declared before provider that it decorates", () => {
1115
+ angular
1116
+ .module("theModule", [])
1117
+ .decorator("theProvider", ($delegate) => $delegate)
1118
+ .factory("theProvider", () => ({}));
1119
+
1120
+ expect(() => {
1121
+ createInjector(["theModule"]);
1122
+ }).not.toThrow();
1123
+ });
1124
+
1125
+ it("should run decorators in order of declaration, even when mixed with provider.decorator", () => {
1126
+ let log = "";
1127
+
1128
+ angular
1129
+ .module("theModule", [])
1130
+ .factory("theProvider", () => ({ api: "provider" }))
1131
+ .decorator("theProvider", ($delegate) => {
1132
+ $delegate.api += "-first";
1133
+ return $delegate;
1134
+ })
1135
+ .config(($provide) => {
1136
+ $provide.decorator("theProvider", ($delegate) => {
1137
+ $delegate.api += "-second";
1138
+ return $delegate;
1139
+ });
1140
+ })
1141
+ .decorator("theProvider", ($delegate) => {
1142
+ $delegate.api += "-third";
1143
+ return $delegate;
1144
+ })
1145
+ .run((theProvider) => {
1146
+ log = theProvider.api;
1147
+ });
1148
+
1149
+ createInjector(["theModule"]);
1150
+ expect(log).toBe("provider-first-second-third");
1151
+ });
1152
+
1153
+ it("should decorate the last declared provider if multiple have been declared", () => {
1154
+ let log = "";
1155
+
1156
+ angular
1157
+ .module("theModule", [])
1158
+ .factory("theProvider", () => ({
1159
+ api: "firstProvider",
1160
+ }))
1161
+ .decorator("theProvider", ($delegate) => {
1162
+ $delegate.api += "-decorator";
1163
+ return $delegate;
1164
+ })
1165
+ .factory("theProvider", () => ({
1166
+ api: "secondProvider",
1167
+ }))
1168
+ .run((theProvider) => {
1169
+ log = theProvider.api;
1170
+ });
1171
+
1172
+ createInjector(["theModule"]);
1173
+ expect(log).toBe("secondProvider-decorator");
1174
+ });
1175
+
1176
+ it("should allow module redefinition", () => {
1177
+ expect(angular.module("a", [])).not.toBe(angular.module("a", []));
1178
+ });
1179
+
1180
+ it("should complain of no module", () => {
1181
+ expect(() => {
1182
+ angular.module("dontExist");
1183
+ }).toThrow();
1184
+ });
1185
+
1186
+ it('should complain if a module is called "hasOwnProperty', () => {
1187
+ expect(() => {
1188
+ angular.module("hasOwnProperty", []);
1189
+ }).toThrow();
1190
+ });
1191
+ });
@@ -1,9 +1,9 @@
1
1
  import { isString } from "../shared/utils.js";
2
2
  import { NG_ANIMATE_CHILDREN_DATA } from "./shared.js";
3
3
  import { setCacheData } from "../shared/dom.js";
4
- import { $injectTokens } from "../injection-tokens.js";
4
+ import { $injectTokens as $t } from "../injection-tokens.js";
5
5
 
6
- $$AnimateChildrenDirective.$inject = [$injectTokens.$interpolate];
6
+ $$AnimateChildrenDirective.$inject = [$t.$interpolate];
7
7
 
8
8
  /**
9
9
  * @param {*} $interpolate
@@ -5,33 +5,33 @@ import {
5
5
  } from "../shared/dom.js";
6
6
  import { isDefined } from "../shared/utils.js";
7
7
  import {
8
- TRANSITION_DURATION_PROP,
9
- TRANSITION_DELAY_PROP,
8
+ ACTIVE_CLASS_SUFFIX,
9
+ ADD_CLASS_SUFFIX,
10
10
  ANIMATION_DELAY_PROP,
11
- TRANSITION_PROP,
12
- PROPERTY_KEY,
13
11
  ANIMATION_DURATION_PROP,
14
12
  ANIMATION_ITERATION_COUNT_KEY,
15
13
  ANIMATION_PROP,
16
- DURATION_KEY,
14
+ ANIMATIONEND_EVENT,
17
15
  applyAnimationClassesFactory,
18
- pendClasses,
19
- prepareAnimationOptions,
20
- packageStyles,
21
- EVENT_CLASS_PREFIX,
22
- ADD_CLASS_SUFFIX,
23
- REMOVE_CLASS_SUFFIX,
24
- applyInlineStyle,
25
- SAFE_FAST_FORWARD_DURATION_VALUE,
26
- ACTIVE_CLASS_SUFFIX,
27
16
  applyAnimationFromStyles,
28
17
  applyAnimationStyles,
18
+ applyAnimationToStyles,
19
+ applyInlineStyle,
29
20
  blockKeyframeAnimations,
21
+ DURATION_KEY,
22
+ EVENT_CLASS_PREFIX,
23
+ packageStyles,
24
+ pendClasses,
25
+ prepareAnimationOptions,
26
+ PROPERTY_KEY,
27
+ REMOVE_CLASS_SUFFIX,
30
28
  removeFromArray,
29
+ SAFE_FAST_FORWARD_DURATION_VALUE,
31
30
  TIMING_KEY,
31
+ TRANSITION_DELAY_PROP,
32
+ TRANSITION_DURATION_PROP,
33
+ TRANSITION_PROP,
32
34
  TRANSITIONEND_EVENT,
33
- ANIMATIONEND_EVENT,
34
- applyAnimationToStyles,
35
35
  } from "./shared.js";
36
36
 
37
37
  const ANIMATE_TIMER_KEY = "$$animateCss";
@@ -771,8 +771,7 @@ export function AnimateCssProvider() {
771
771
 
772
772
  temporaryStyles.forEach((entry) => {
773
773
  const key = entry[0];
774
- const value = entry[1];
775
- node.style[key] = value;
774
+ node.style[key] = entry[1];
776
775
  });
777
776
 
778
777
  applyAnimationClasses(element, options);
@@ -1,5 +1,5 @@
1
1
  import { dealoc } from "../../shared/dom.js";
2
- import { Angular } from "../../loader.js";
2
+ import { Angular } from "../../angular.js";
3
3
  import { isObject } from "../../shared/utils.js";
4
4
  import { isFunction } from "../../shared/utils.js";
5
5
  import { createInjector } from "../di/injector.js";
@@ -5,7 +5,7 @@
5
5
 
6
6
  /**
7
7
  * Service provider that creates a requestAnimationFrame-based scheduler.
8
- * @implements {ServiceProvider}
8
+ * @type {ServiceProvider}
9
9
  */
10
10
  export class RafSchedulerProvider {
11
11
  constructor() {
@@ -1,4 +1,4 @@
1
- import { isString, minErr, extend } from "../shared/utils.js";
1
+ import { extend, isString, minErr } from "../shared/utils.js";
2
2
  import { ASTType } from "../core/parse/ast-type.js";
3
3
 
4
4
  export const ADD_CLASS_SUFFIX = "-add";
@@ -76,15 +76,6 @@ export function assertArg(arg, name, reason) {
76
76
  return arg;
77
77
  }
78
78
 
79
- export function mergeClasses(a, b) {
80
- if (!a && !b) return "";
81
- if (!a) return b;
82
- if (!b) return a;
83
- if (Array.isArray(a)) a = a.join(" ");
84
- if (Array.isArray(b)) b = b.join(" ");
85
- return `${a} ${b}`;
86
- }
87
-
88
79
  export function packageStyles(options) {
89
80
  const styles = {};
90
81
  if (options && (options.to || options.from)) {
@@ -340,8 +331,7 @@ export function blockKeyframeAnimations(node, applyBlock) {
340
331
 
341
332
  export function applyInlineStyle(node, styleTuple) {
342
333
  const prop = styleTuple[0];
343
- const value = styleTuple[1];
344
- node.style[prop] = value;
334
+ node.style[prop] = styleTuple[1];
345
335
  }
346
336
 
347
337
  export function concatWithSpace(a, b) {
@@ -1,5 +1,5 @@
1
1
  import { createElementFromHTML, dealoc } from "./shared/dom.js";
2
- import { Angular } from "./loader.js";
2
+ import { Angular } from "./angular.js";
3
3
  import { browserTrigger, wait } from "./shared/test-utils.js";
4
4
 
5
5
  describe("binding", () => {
@@ -26,7 +26,7 @@ export class Attributes {
26
26
  /**
27
27
  * @param {import('../scope/scope.js').Scope} $rootScope
28
28
  * @param {*} $animate
29
- * @param {import("../exception-handler.js").ErrorHandler} $exceptionHandler
29
+ * @param {import("../../services/exception/exception-handler.js").ErrorHandler} $exceptionHandler
30
30
  * @param {*} $sce
31
31
  * @param {import("../../shared/noderef.js").NodeRef} [nodeRef]
32
32
  * @param {Object} [attributesToCopy]
@@ -37,7 +37,7 @@ import {
37
37
  isProxy,
38
38
  hasOwn,
39
39
  } from "../../shared/utils.js";
40
- import { SCE_CONTEXTS } from "../sce/sce.js";
40
+ import { SCE_CONTEXTS } from "../../services/sce/sce.js";
41
41
  import { PREFIX_REGEXP } from "../../shared/constants.js";
42
42
  import { createEventDirective } from "../../directive/events/events.js";
43
43
  import { Attributes } from "./attributes.js";
@@ -139,7 +139,7 @@ const EVENT_HANDLER_ATTR_REGEXP = /^(on[a-z]+|formaction)$/;
139
139
  export const DirectiveSuffix = "Directive";
140
140
 
141
141
  export class CompileProvider {
142
- static $inject = ["$provide", "$$sanitizeUriProvider"];
142
+ /* @ignore */ static $inject = ["$provide", "$$sanitizeUriProvider"];
143
143
 
144
144
  /**
145
145
  * @param {import('../../interface.js').Provider} $provide
@@ -291,7 +291,7 @@ export class CompileProvider {
291
291
  "$exceptionHandler",
292
292
  /**
293
293
  * @param {import("../../core/di/internal-injector.js").InjectorService} $injector
294
- * @param {import('../exception-handler.js').ErrorHandler} $exceptionHandler
294
+ * @param {import('../../services/exception/exception-handler.js').ErrorHandler} $exceptionHandler
295
295
  */
296
296
  function ($injector, $exceptionHandler) {
297
297
  const directives = [];
@@ -619,7 +619,7 @@ export class CompileProvider {
619
619
  /**
620
620
  * @param {import("../../core/di/internal-injector.js").InjectorService} $injector
621
621
  * @param {*} $interpolate
622
- * @param {import("../exception-handler.js").ErrorHandler} $exceptionHandler
622
+ * @param {import("../../services/exception/exception-handler.js").ErrorHandler} $exceptionHandler
623
623
  * @param {*} $templateRequest
624
624
  * @param {import("../parse/interface.ts").ParseService} $parse
625
625
  * @param {*} $controller
@@ -1216,8 +1216,7 @@ export class CompileProvider {
1216
1216
  // Null out all of these references for garbage collection
1217
1217
  compileNodes = transcludeFn = previousCompileContext = null;
1218
1218
  }
1219
- const linked = compiled.apply(this, arguments);
1220
- return linked;
1219
+ return compiled.apply(this, arguments);
1221
1220
  };
1222
1221
  }
1223
1222
 
@@ -1561,14 +1560,13 @@ export class CompileProvider {
1561
1560
  // * `undefined` - a slot that was not declared (i.e. invalid)
1562
1561
  const slotTranscludeFn = boundTranscludeFn.$$slots[slotName];
1563
1562
  if (slotTranscludeFn) {
1564
- const slotTranscludeRes = slotTranscludeFn(
1563
+ return slotTranscludeFn(
1565
1564
  scope,
1566
1565
  cloneAttachFn,
1567
1566
  transcludeControllers,
1568
1567
  futureParentElement,
1569
1568
  scopeToChild,
1570
1569
  );
1571
- return slotTranscludeRes;
1572
1570
  }
1573
1571
 
1574
1572
  if (isUndefined(slotTranscludeFn)) {
@@ -1581,14 +1579,13 @@ export class CompileProvider {
1581
1579
  );
1582
1580
  }
1583
1581
  } else {
1584
- const boundTranscludeRes = boundTranscludeFn(
1582
+ return boundTranscludeFn(
1585
1583
  scope,
1586
1584
  cloneAttachFn,
1587
1585
  transcludeControllers,
1588
1586
  futureParentElement,
1589
1587
  scopeToChild,
1590
1588
  );
1591
- return boundTranscludeRes;
1592
1589
  }
1593
1590
  }
1594
1591
  };
@@ -1,4 +1,4 @@
1
- import { Angular } from "../../loader.js";
1
+ import { Angular } from "../../angular.js";
2
2
  import { createInjector } from "../di/injector.js";
3
3
  import {
4
4
  dealoc,
@@ -1,4 +1,4 @@
1
- import { Angular } from "../../loader.js";
1
+ import { Angular } from "../../angular.js";
2
2
  import { createInjector } from "../di/injector.js";
3
3
 
4
4
  describe("$controller", () => {
@@ -5,6 +5,7 @@ const TEST_URL = "src/core/controller/controller.html";
5
5
  test("unit tests contain no errors", async ({ page }) => {
6
6
  await page.goto(TEST_URL);
7
7
  await page.content();
8
+ await page.waitForTimeout(1000);
8
9
  await expect(page.locator(".jasmine-overall-result")).toHaveText(
9
10
  /0 failures/,
10
11
  );
@@ -1,16 +1,16 @@
1
1
  import {
2
+ assert,
3
+ assertArg,
2
4
  assertArgFn,
3
- minErr,
5
+ assertNotHasOwnProperty,
4
6
  isFunction,
7
+ isObject,
5
8
  isString,
6
9
  isUndefined,
7
- assertArg,
8
- assertNotHasOwnProperty,
9
- isObject,
10
- assert,
10
+ minErr,
11
11
  } from "../../shared/utils.js";
12
12
  import { INJECTOR_LITERAL } from "./ng-module.js";
13
- import { ProviderInjector, InjectorService } from "./internal-injector.js";
13
+ import { InjectorService, ProviderInjector } from "./internal-injector.js";
14
14
 
15
15
  const ARROW_ARG = /^([^(]+?)=>/;
16
16
  const FN_ARGS = /^[^(]*\(\s*([^)]*)\)/m;
@@ -33,9 +33,6 @@ export function createInjector(modulesToLoad, strictDi = false) {
33
33
  const loadedModules = new Map(); // Keep track of loaded modules to avoid circular dependencies
34
34
 
35
35
  const providerCache = {
36
- /**
37
- * @type {import('../../interface.ts').Provider}
38
- */
39
36
  $provide: {
40
37
  provider: supportObject(provider),
41
38
  factory: supportObject(factory),
@@ -62,15 +59,10 @@ export function createInjector(modulesToLoad, strictDi = false) {
62
59
  const runBlocks = loadModules(modulesToLoad);
63
60
  instanceInjector = protoInstanceInjector.get(INJECTOR_LITERAL);
64
61
 
65
- runBlocks.forEach((fn) => {
66
- if (fn) instanceInjector.invoke(fn);
67
- });
62
+ runBlocks.forEach((fn) => fn && instanceInjector.invoke(fn));
68
63
 
69
- instanceInjector.loadNewModules = function (mods) {
70
- loadModules(mods).forEach((fn) => {
71
- if (fn) instanceInjector.invoke(fn);
72
- });
73
- };
64
+ instanceInjector.loadNewModules = (mods) =>
65
+ loadModules(mods).forEach((fn) => fn && instanceInjector.invoke(fn));
74
66
 
75
67
  return instanceInjector;
76
68
 
@@ -199,7 +191,7 @@ export function createInjector(modulesToLoad, strictDi = false) {
199
191
 
200
192
  try {
201
193
  if (isString(module)) {
202
- /** @type {import('./ng-module').NgModule} */
194
+ /** @type {import('./ng-module.js').NgModule} */
203
195
  const moduleFn = window["angular"].module(module);
204
196
  instanceInjector.modules[/** @type {string } */ (module)] = moduleFn;
205
197
  runBlocks = runBlocks
@@ -260,12 +252,10 @@ function stringifyFn(fn) {
260
252
  */
261
253
  function extractArgs(fn) {
262
254
  const fnText = stringifyFn(fn).replace(STRIP_COMMENTS, "");
263
- const args = fnText.match(ARROW_ARG) || fnText.match(FN_ARGS);
264
- return args;
255
+ return fnText.match(ARROW_ARG) || fnText.match(FN_ARGS);
265
256
  }
266
257
 
267
258
  /**
268
- *
269
259
  * @param {any} fn
270
260
  * @param {boolean} [strictDi]
271
261
  * @param {String} [name]
@@ -304,10 +294,6 @@ export function annotate(fn, strictDi, name) {
304
294
  return $inject;
305
295
  }
306
296
 
307
- /**
308
- * @param {function(string, any):any} delegate
309
- * @returns {any}
310
- */
311
297
  function supportObject(delegate) {
312
298
  return function (key, value) {
313
299
  if (isObject(key)) {
@@ -1,4 +1,4 @@
1
- import { Angular } from "../../loader.js";
1
+ import { Angular } from "../../angular.js";
2
2
  import { createInjector, annotate } from "./injector.js";
3
3
  import { extend } from "../../shared/utils.js";
4
4
 
@@ -296,7 +296,7 @@ describe("injector.modules", () => {
296
296
  module.constant("b", 2);
297
297
  const injector = createInjector(["myModule"]);
298
298
  class Foo {
299
- static $inject = ["a", "b"];
299
+ /* @ignore */ static $inject = ["a", "b"];
300
300
  constructor(a, b) {
301
301
  this.c = a + b;
302
302
  }
@@ -1,11 +1,11 @@
1
1
  import { test, expect } from "@playwright/test";
2
2
 
3
- const TEST_URL = "src/core/di/injector.html";
3
+ const TEST_URL = "src/core/di/injector.html?random=false";
4
4
 
5
5
  test("unit tests contain no errors", async ({ page }) => {
6
6
  await page.goto(TEST_URL);
7
7
  await page.content();
8
- await page.waitForTimeout(5000);
8
+ await page.waitForTimeout(1000);
9
9
  await expect(page.locator(".jasmine-overall-result")).toHaveText(
10
10
  /0 failures/,
11
11
  );
@@ -109,8 +109,7 @@ class AbstractInjector {
109
109
 
110
110
  if (isClass(/** @type {Function} */ (fn))) {
111
111
  args.unshift(null);
112
- const res = new (Function.prototype.bind.apply(fn, args))();
113
- return res;
112
+ return new (Function.prototype.bind.apply(fn, args))();
114
113
  } else {
115
114
  return /** @type {Function} */ (fn).apply(self, args);
116
115
  }
@@ -186,8 +185,11 @@ export class InjectorService extends AbstractInjector {
186
185
  */
187
186
  constructor(providerInjector, strictDi) {
188
187
  super(strictDi);
188
+
189
+ /** @type {ProviderInjector} */
189
190
  this.providerInjector = providerInjector;
190
- this.modules = this.providerInjector.modules;
191
+ /** @type {Object.<string, import("./ng-module.js").NgModule>} */
192
+ this.modules = providerInjector.modules;
191
193
  }
192
194
 
193
195
  /**
@@ -196,8 +198,7 @@ export class InjectorService extends AbstractInjector {
196
198
  */
197
199
  factory(serviceName) {
198
200
  const provider = this.providerInjector.get(serviceName + providerSuffix);
199
- const res = this.invoke(provider.$get, provider, undefined, serviceName);
200
- return res;
201
+ return this.invoke(provider.$get, provider, undefined, serviceName);
201
202
  }
202
203
 
203
204
  /**
@@ -231,8 +232,7 @@ function stringifyFn(fn) {
231
232
  */
232
233
  function extractArgs(fn) {
233
234
  const fnText = stringifyFn(fn).replace(STRIP_COMMENTS, "");
234
- const args = fnText.match(ARROW_ARG) || fnText.match(FN_ARGS);
235
- return args;
235
+ return fnText.match(ARROW_ARG) || fnText.match(FN_ARGS);
236
236
  }
237
237
 
238
238
  /**