@angular-wave/angular.ts 0.9.8 → 0.10.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 (53) hide show
  1. package/@types/angular.d.ts +2 -2
  2. package/@types/animations/animate-js.d.ts +1 -1
  3. package/@types/animations/animate-queue.d.ts +0 -1
  4. package/@types/animations/animate-swap.d.ts +2 -4
  5. package/@types/animations/animate.d.ts +2 -2
  6. package/@types/animations/raf-scheduler.d.ts +4 -4
  7. package/@types/animations/shared.d.ts +30 -2
  8. package/@types/core/compile/attributes.d.ts +5 -8
  9. package/@types/core/compile/compile.d.ts +6 -63
  10. package/@types/core/compile/inteface.d.ts +82 -0
  11. package/@types/core/controller/controller.d.ts +1 -1
  12. package/@types/core/di/ng-module.d.ts +14 -14
  13. package/@types/core/scope/interface.d.ts +18 -0
  14. package/@types/core/scope/scope.d.ts +16 -97
  15. package/@types/directive/aria/aria.d.ts +11 -13
  16. package/@types/directive/attrs/attrs.d.ts +2 -2
  17. package/@types/directive/channel/channel.d.ts +3 -5
  18. package/@types/directive/cloak/cloak.d.ts +2 -2
  19. package/@types/directive/events/events.d.ts +16 -0
  20. package/@types/directive/http/http.d.ts +4 -22
  21. package/@types/directive/if/if.d.ts +2 -4
  22. package/@types/directive/include/include.d.ts +4 -4
  23. package/@types/directive/messages/messages.d.ts +3 -3
  24. package/@types/directive/observe/observe.d.ts +2 -5
  25. package/@types/directive/options/options.d.ts +2 -2
  26. package/@types/directive/transclude/transclude.d.ts +4 -4
  27. package/@types/directive/viewport/viewport.d.ts +4 -0
  28. package/@types/directive/worker/worker.d.ts +15 -0
  29. package/@types/interface.d.ts +6 -5
  30. package/@types/namespace.d.ts +69 -40
  31. package/@types/router/directives/view-directive.d.ts +2 -2
  32. package/@types/router/path/path-utils.d.ts +2 -2
  33. package/@types/router/state/state-object.d.ts +6 -6
  34. package/@types/router/state/state-service.d.ts +3 -3
  35. package/@types/router/template-factory.d.ts +1 -1
  36. package/@types/router/transition/hook-builder.d.ts +1 -1
  37. package/@types/router/transition/interface.d.ts +1 -12
  38. package/@types/router/transition/transition-hook.d.ts +31 -0
  39. package/@types/router/transition/transition-service.d.ts +1 -1
  40. package/@types/router/transition/transition.d.ts +2 -2
  41. package/@types/services/pubsub/pubsub.d.ts +2 -2
  42. package/@types/services/sse/interface.d.ts +27 -1
  43. package/@types/services/sse/sse.d.ts +4 -3
  44. package/@types/services/worker/interface.d.ts +12 -0
  45. package/@types/services/worker/worker.d.ts +31 -0
  46. package/@types/shared/url-utils/url-utils.d.ts +14 -14
  47. package/README.md +2 -2
  48. package/dist/angular-ts.esm.js +1462 -1147
  49. package/dist/angular-ts.umd.js +1462 -1147
  50. package/dist/angular-ts.umd.min.js +1 -1
  51. package/dist/angular.css +1 -0
  52. package/package.json +4 -3
  53. package/css/angular.css +0 -16
@@ -1,8 +1,8 @@
1
1
  export const REGEX_STRING_REGEXP: RegExp;
2
2
  /**
3
- * @type {Record<string, import("../../interface.js").DirectiveFactory>}
3
+ * @type {Record<string, import("../../interface.ts").DirectiveFactory>}
4
4
  */
5
5
  export const ngAttributeAliasDirectives: Record<
6
6
  string,
7
- import("../../interface.js").DirectiveFactory
7
+ import("../../interface.ts").DirectiveFactory
8
8
  >;
@@ -1,10 +1,8 @@
1
1
  /**
2
- * @param {import("../../services/pubsub/pubsub.js").PubSub} $eventBus
3
- * @returns {import("../../interface.ts").Directive}
2
+ * @param {ng.PubSubService} $eventBus
3
+ * @returns {ng.Directive}
4
4
  */
5
- export function ngChannelDirective(
6
- $eventBus: import("../../services/pubsub/pubsub.js").PubSub,
7
- ): import("../../interface.ts").Directive;
5
+ export function ngChannelDirective($eventBus: ng.PubSubService): ng.Directive;
8
6
  export namespace ngChannelDirective {
9
7
  let $inject: string[];
10
8
  }
@@ -1,4 +1,4 @@
1
1
  /**
2
- * @returns {import('../../interface.ts').Directive}
2
+ * @returns {ng.Directive}
3
3
  */
4
- export function ngCloakDirective(): import("../../interface.ts").Directive;
4
+ export function ngCloakDirective(): ng.Directive;
@@ -12,6 +12,22 @@ export function createEventDirective(
12
12
  directiveName: string,
13
13
  eventName: string,
14
14
  ): ng.Directive;
15
+ /**
16
+ *
17
+ * @param {ng.ParseService} $parse
18
+ * @param {ng.ExceptionHandlerService} $exceptionHandler
19
+ * @param {ng.WindowService} $window
20
+ * @param {string} directiveName
21
+ * @param {string} eventName
22
+ * @returns {ng.Directive}
23
+ */
24
+ export function createWindowEventDirective(
25
+ $parse: ng.ParseService,
26
+ $exceptionHandler: ng.ExceptionHandlerService,
27
+ $window: ng.WindowService,
28
+ directiveName: string,
29
+ eventName: string,
30
+ ): ng.Directive;
15
31
  /**
16
32
  * @type {Record<string, ng.DirectiveFactory>}
17
33
  */
@@ -1,29 +1,12 @@
1
- /**
2
- * @typedef {"click" | "change" | "submit"} EventType
3
- */
4
1
  /**
5
2
  * Selects DOM event to listen for based on the element type.
6
3
  *
7
4
  * @param {Element} element - The DOM element to inspect.
8
- * @returns {EventType} The name of the event to listen for.
9
- */
10
- export function getEventNameForElement(element: Element): EventType;
11
- /**
12
- * Handles DOM manipulation based on a swap strategy and server-rendered HTML.
13
- *
14
- * @param {string} html - The HTML string returned from the server.
15
- * @param {import("./interface.ts").SwapModeType} swap
16
- * @param {Element} target - The target DOM element to apply the swap to.
17
- * @param {ng.Scope} scope
18
- * @param {ng.CompileService} $compile
5
+ * @returns {"click" | "change" | "submit"} The name of the event to listen for.
19
6
  */
20
- export function handleSwapResponse(
21
- html: string,
22
- swap: import("./interface.ts").SwapModeType,
23
- target: Element,
24
- scope: ng.Scope,
25
- $compile: ng.CompileService,
26
- ): void;
7
+ export function getEventNameForElement(
8
+ element: Element,
9
+ ): "click" | "change" | "submit";
27
10
  /**
28
11
  * Creates an HTTP directive factory that supports GET, DELETE, POST, PUT.
29
12
  *
@@ -45,4 +28,3 @@ export const ngPostDirective: ng.DirectiveFactory;
45
28
  export const ngPutDirective: ng.DirectiveFactory;
46
29
  /** @type {ng.DirectiveFactory} */
47
30
  export const ngSseDirective: ng.DirectiveFactory;
48
- export type EventType = "click" | "change" | "submit";
@@ -1,10 +1,8 @@
1
1
  /**
2
2
  * @param {*} $animate
3
- * @returns {import("../../interface.ts").Directive}
3
+ * @returns {ng.Directive}
4
4
  */
5
- export function ngIfDirective(
6
- $animate: any,
7
- ): import("../../interface.ts").Directive;
5
+ export function ngIfDirective($animate: any): ng.Directive;
8
6
  export namespace ngIfDirective {
9
7
  let $inject: string[];
10
8
  }
@@ -4,23 +4,23 @@
4
4
  * @param {import("../../services/anchor-scroll/anchor-scroll.js").AnchorScrollFunction} $anchorScroll
5
5
  * @param {*} $animate
6
6
  * @param {import('../../services/exception/interface.ts').ErrorHandler} $exceptionHandler
7
- * @returns {import('../../interface.js').Directive}
7
+ * @returns {import('../../interface.ts').Directive}
8
8
  */
9
9
  export function ngIncludeDirective(
10
10
  $templateRequest: any,
11
11
  $anchorScroll: import("../../services/anchor-scroll/anchor-scroll.js").AnchorScrollFunction,
12
12
  $animate: any,
13
13
  $exceptionHandler: import("../../services/exception/interface.ts").ErrorHandler,
14
- ): import("../../interface.js").Directive;
14
+ ): import("../../interface.ts").Directive;
15
15
  export namespace ngIncludeDirective {
16
16
  let $inject: string[];
17
17
  }
18
18
  /**
19
- * @param {import("../../core/compile/compile.js").CompileFn} $compile
19
+ * @param {ng.CompileService} $compile
20
20
  * @returns {import("../../interface.ts").Directive}
21
21
  */
22
22
  export function ngIncludeFillContentDirective(
23
- $compile: import("../../core/compile/compile.js").CompileFn,
23
+ $compile: ng.CompileService,
24
24
  ): import("../../interface.ts").Directive;
25
25
  export namespace ngIncludeFillContentDirective {
26
26
  let $inject_1: string[];
@@ -20,13 +20,13 @@ export namespace ngMessagesIncludeDirective {
20
20
  }
21
21
  export const ngMessageDirective: (
22
22
  any: any,
23
- ) => import("../../interface.js").Directive;
23
+ ) => import("../../interface.ts").Directive;
24
24
  export const ngMessageExpDirective: (
25
25
  any: any,
26
- ) => import("../../interface.js").Directive;
26
+ ) => import("../../interface.ts").Directive;
27
27
  export const ngMessageDefaultDirective: (
28
28
  any: any,
29
- ) => import("../../interface.js").Directive;
29
+ ) => import("../../interface.ts").Directive;
30
30
  declare class NgMessageCtrl {
31
31
  /**
32
32
  * @param {Element} $element
@@ -1,9 +1,6 @@
1
1
  /**
2
2
  * @param {string} source - the name of the attribute to be observed
3
3
  * @param {string} prop - the scope property to be updated with attribute value
4
- * @returns {import("../../interface.ts").Directive}
4
+ * @returns {ng.Directive}
5
5
  */
6
- export function ngObserveDirective(
7
- source: string,
8
- prop: string,
9
- ): import("../../interface.ts").Directive;
6
+ export function ngObserveDirective(source: string, prop: string): ng.Directive;
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  *
3
- * @param {import("../../core/compile/compile.js").CompileFn} $compile
3
+ * @param {ng.CompileService} $compile
4
4
  * @param {import("../../core/parse/interface.ts").ParseService} $parse
5
5
  * @returns {import("../../interface.ts").Directive}
6
6
  */
7
7
  export function ngOptionsDirective(
8
- $compile: import("../../core/compile/compile.js").CompileFn,
8
+ $compile: ng.CompileService,
9
9
  $parse: import("../../core/parse/interface.ts").ParseService,
10
10
  ): import("../../interface.ts").Directive;
11
11
  export namespace ngOptionsDirective {
@@ -1,10 +1,10 @@
1
1
  /**
2
- * @param {import("../../core/compile/compile.js").CompileFn} $compile
3
- * @returns {import("../../interface.ts").Directive}
2
+ * @param {ng.CompileService} $compile
3
+ * @returns {ng.Directive}
4
4
  */
5
5
  export function ngTranscludeDirective(
6
- $compile: import("../../core/compile/compile.js").CompileFn,
7
- ): import("../../interface.ts").Directive;
6
+ $compile: ng.CompileService,
7
+ ): ng.Directive;
8
8
  export namespace ngTranscludeDirective {
9
9
  let $inject: string[];
10
10
  }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @returns {ng.Directive}
3
+ */
4
+ export function ngViewportDirective(): ng.Directive;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * ngWorker directive factory
3
+ * Usage: <div ng-worker="workerName" data-params="{{ expression }}" data-on-result="callback($result)"></div>
4
+ */
5
+ export function ngWorkerDirective(
6
+ $worker: any,
7
+ $parse: any,
8
+ $log: any,
9
+ ): {
10
+ restrict: string;
11
+ link(scope: any, element: any, attrs: any): void;
12
+ };
13
+ export namespace ngWorkerDirective {
14
+ let $inject: string[];
15
+ }
@@ -256,7 +256,7 @@ export interface DirectivePrePost {
256
256
  export type DirectiveLinkFn = (
257
257
  scope: Scope,
258
258
  element: HTMLElement,
259
- attrs: Attributes,
259
+ attrs: Attributes & Record<string, any>,
260
260
  controller?: TController,
261
261
  transclude?: (...args: any[]) => any,
262
262
  ) => void;
@@ -264,17 +264,18 @@ export type DirectiveLinkFn = (
264
264
  * A compile function used to prepare directives before linking.
265
265
  */
266
266
  export type DirectiveCompileFn = (
267
- templateElement: HTMLElement,
268
- templateAttributes: Attributes,
269
- transclude: (...args: any[]) => any,
267
+ templateElement?: HTMLElement,
268
+ templateAttributes?: Attributes & Record<string, any>,
269
+ transclude?: (...args: any[]) => any,
270
270
  ) => void | DirectiveLinkFn | DirectivePrePost;
271
271
  /**
272
272
  * Defines the structure of an AngularTS directive.
273
+ * @typedef {Object} Directive
273
274
  */
274
275
  export interface Directive {
275
276
  /** Optional name (usually inferred) */
276
277
  name?: string;
277
- /** Restrict option: 'A' and/or 'E'. Defaults to 'EA' */
278
+ /** Restrict option: 'A' and/or 'E'. Defaults to 'EA' if not defined */
278
279
  restrict?: string;
279
280
  /** Compile function for the directive */
280
281
  compile?: DirectiveCompileFn;
@@ -1,82 +1,111 @@
1
1
  export { angular } from "./index.js";
2
+ import { Angular as TAngular } from "./angular.js";
3
+ import { Attributes as TAttributes } from "./core/compile/attributes.js";
4
+ import { Scope as TScope } from "./core/scope/scope.js";
5
+ import { NgModule as TNgModule } from "./core/di/ng-module.js";
6
+ import { InjectorService as TInjectorService } from "./core/di/internal-injector.js";
2
7
  import {
3
- AnchorScrollProvider,
8
+ AnchorScrollProvider as TAnchorScrollProvider,
4
9
  AnchorScrollService as TAnchorScrollService,
5
10
  } from "./services/anchor-scroll/anchor-scroll.js";
6
11
  import { ControllerService as TControllerService } from "./core/controller/interface.ts";
7
- import { ErrorHandler } from "./services/exception/interface.ts";
8
- import { Angular } from "./angular.js";
9
- import { Attributes } from "./core/compile/attributes.js";
10
- import { Scope } from "./core/scope/scope.js";
11
- import { NgModule } from "./core/di/ng-module.js";
12
- import { PubSubProvider, PubSub } from "./services/pubsub/pubsub.js";
13
- import type { ErrorHandlingConfig as TErrorHandlingConfig } from "./shared/interface.ts";
14
- import { InjectorService } from "./core/di/internal-injector.js";
15
- import { CompileFn } from "./core/compile/compile.js";
12
+ import { ErrorHandler as TErrorHandler } from "./services/exception/interface.ts";
16
13
  import { ParseService as TParseService } from "./core/parse/interface.ts";
17
14
  import { TemplateRequestService as TTemplateRequestService } from "./services/template-request/interface.ts";
18
- import { HttpParamSerializer } from "./services/http/interface.ts";
19
- import { HttpParamSerializerProvider } from "./services/http/http.js";
20
- import { FilterFactory, FilterFn as TFilterFn } from "./filters/interface.ts";
15
+ import { HttpParamSerializer as THttpParamSerializer } from "./services/http/interface.ts";
16
+ import { HttpParamSerializerProvider as THttpParamSerializerProvider } from "./services/http/http.js";
17
+ import {
18
+ FilterFactory as TFilterFactory,
19
+ FilterFn as TFilterFn,
20
+ } from "./filters/interface.ts";
21
21
  import { InterpolateService as TInterpolateService } from "./core/interpolate/interface.ts";
22
- import { InterpolateProvider } from "./core/interpolate/interpolate.js";
23
- import { SceDelegateProvider, SceProvider } from "./services/sce/sce.js";
22
+ import { InterpolateProvider as TInterpolateProvider } from "./core/interpolate/interpolate.js";
23
+ import {
24
+ SceProvider as TSceProvider,
25
+ SceDelegateProvider as TSceDelegateProvider,
26
+ } from "./services/sce/sce.js";
27
+ import { StateProvider as TStateProvider } from "./router/state/state-service.js";
28
+ import { HttpService as THttpService } from "./services/http/interface.ts";
29
+ import { LogService as TLogService } from "./services/log/interface.ts";
30
+ import {
31
+ PubSubProvider as TPubSubProvider,
32
+ PubSub as TPubSub,
33
+ } from "./services/pubsub/pubsub.js";
24
34
  import {
25
35
  Directive as TDirective,
26
36
  DirectiveFactory as TDirectiveFactory,
27
37
  Component as TComponent,
28
38
  Controller as TController,
29
39
  } from "./interface.ts";
30
- import { StateProvider } from "./router/state/state-service.js";
31
- import { HttpService as THttpService } from "./services/http/interface.ts";
32
- import { LogService as TLogService } from "./services/log/interface.ts";
33
40
  import {
34
41
  SseService as TSseService,
35
42
  SseConfig as TSseConfig,
36
43
  } from "./services/sse/interface.ts";
44
+ import type { ErrorHandlingConfig as TErrorHandlingConfig } from "./shared/interface.ts";
45
+ import {
46
+ BoundTranscludeFn as TBoundTranscludeFn,
47
+ CompileFn as TCompileFn,
48
+ PublicLinkFn as TPublicLinkFn,
49
+ NodeLinkFnCtx as TNodeLinkFnCtx,
50
+ NodeLinkFn as TNodeLinkFn,
51
+ TranscludeFn as TTranscludeFn,
52
+ LinkFnMapping as TLinkFnMapping,
53
+ CompositeLinkFn as TCompositeLinkFn,
54
+ } from "./core/compile/inteface.ts";
55
+ import {
56
+ WorkerConnection as TWorkerConnection,
57
+ WorkerConfig as TWorkerConfig,
58
+ } from "./services/worker/interface.ts";
37
59
  declare global {
38
60
  interface Function {
39
61
  $inject?: readonly string[] | undefined;
40
62
  }
41
- namespace ng {
42
- type Angular = InstanceType<typeof Angular>;
43
- type Attributes = InstanceType<typeof Attributes>;
63
+ export namespace ng {
64
+ type Angular = TAngular;
65
+ type Attributes = TAttributes & Record<string, any>;
44
66
  type Directive = TDirective;
45
67
  type DirectiveFactory = TDirectiveFactory;
46
68
  type Component = TComponent;
47
69
  type Controller = TController;
48
- type Scope = InstanceType<typeof Scope>;
49
- type NgModule = InstanceType<typeof NgModule>;
50
- type PubSubProvider = InstanceType<typeof PubSubProvider>;
70
+ type Scope = TScope;
71
+ type NgModule = TNgModule;
72
+ type PubSubProvider = TPubSubProvider;
51
73
  type FilterFn = TFilterFn;
52
- type AnchorScrollProvider = InstanceType<typeof AnchorScrollProvider>;
53
- type InterpolateProvider = InstanceType<typeof InterpolateProvider>;
54
- type HttpParamSerializerProvider = InstanceType<
55
- typeof HttpParamSerializerProvider
56
- >;
57
- type SceProvider = InstanceType<typeof SceProvider>;
58
- type SceDelegateProvider = InstanceType<typeof SceDelegateProvider>;
74
+ type CompositeLinkFn = TCompositeLinkFn;
75
+ type PublicLinkFn = TPublicLinkFn;
76
+ type NodeLinkFn = TNodeLinkFn;
77
+ type NodeLinkFnCtx = TNodeLinkFnCtx;
78
+ type TranscludeFn = TTranscludeFn;
79
+ type BoundTranscludeFn = TBoundTranscludeFn;
80
+ type LinkFnMapping = TLinkFnMapping;
81
+ type AnchorScrollProvider = TAnchorScrollProvider;
82
+ type InterpolateProvider = TInterpolateProvider;
83
+ type HttpParamSerializerProvider = THttpParamSerializerProvider;
84
+ type SceProvider = TSceProvider;
85
+ type SceDelegateProvider = TSceDelegateProvider;
59
86
  type AnchorScrollService = TAnchorScrollService;
60
- type CompileService = CompileFn;
87
+ type CompileService = TCompileFn;
61
88
  type ControllerService = TControllerService;
62
- type ExceptionHandlerService = ErrorHandler;
63
- type FilterService = FilterFactory;
64
- type HttpParamSerializerSerService = HttpParamSerializer;
89
+ type ExceptionHandlerService = TErrorHandler;
90
+ type FilterService = TFilterFactory;
91
+ type HttpParamSerializerSerService = THttpParamSerializer;
65
92
  type HttpService = THttpService;
66
93
  type InterpolateService = TInterpolateService;
67
- type InjectorService = InstanceType<typeof InjectorService>;
94
+ type InjectorService = TInjectorService;
68
95
  type LogService = TLogService;
69
96
  type ParseService = TParseService;
70
- type PubSubService = InstanceType<typeof PubSub>;
97
+ type PubSubService = TPubSub;
71
98
  type RootElementService = Element;
72
- type RootScopeService = InstanceType<typeof Scope>;
73
- type StateService = InstanceType<typeof StateProvider>;
99
+ type RootScopeService = TScope;
100
+ type StateService = TStateProvider;
74
101
  type SseService = TSseService;
75
102
  type SseConfig = TSseConfig;
76
- type TemplateCacheService = InstanceType<typeof Map<string, string>>;
103
+ type TemplateCacheService = Map<string, string>;
77
104
  type TemplateRequestService = TTemplateRequestService;
78
105
  type ErrorHandlingConfig = TErrorHandlingConfig;
79
106
  type WindowService = Window;
80
107
  type DocumentService = Document;
108
+ type WorkerConfig = TWorkerConfig;
109
+ type WorkerConnection = TWorkerConnection;
81
110
  }
82
111
  }
@@ -134,5 +134,5 @@ export namespace $ViewDirectiveFill {
134
134
  * });
135
135
  * ```
136
136
  */
137
- /** @type {import("../../interface.js").AnnotatedDirectiveFactory} */
138
- export let ngView: import("../../interface.js").AnnotatedDirectiveFactory;
137
+ /** @type {import("../../interface.ts").AnnotatedDirectiveFactory} */
138
+ export let ngView: import("../../interface.ts").AnnotatedDirectiveFactory;
@@ -37,13 +37,13 @@ export class PathUtils {
37
37
  * @param {PathNode[]} fromPath
38
38
  * @param {PathNode[]} toPath
39
39
  * @param {boolean} [reloadState]
40
- * @returns {import("../transition/interface.js").TreeChanges}
40
+ * @returns {import("../transition/interface.ts").TreeChanges}
41
41
  */
42
42
  static treeChanges(
43
43
  fromPath: PathNode[],
44
44
  toPath: PathNode[],
45
45
  reloadState?: boolean,
46
- ): import("../transition/interface.js").TreeChanges;
46
+ ): import("../transition/interface.ts").TreeChanges;
47
47
  /**
48
48
  * Returns a new path which is: the subpath of the first path which matches the second path.
49
49
  *
@@ -1,4 +1,4 @@
1
- /** @typedef {import('./interface.js').StateDeclaration} StateDeclaration */
1
+ /** @typedef {import('./interface.ts').StateDeclaration} StateDeclaration */
2
2
  /**
3
3
  * Internal representation of a ng-router state.
4
4
  *
@@ -12,9 +12,9 @@
12
12
  */
13
13
  export class StateObject implements StateDeclaration {
14
14
  /**
15
- * @param {import('./interface.js').StateDeclaration} config
15
+ * @param {import('./interface.ts').StateDeclaration} config
16
16
  */
17
- constructor(config: import("./interface.js").StateDeclaration);
17
+ constructor(config: import("./interface.ts").StateDeclaration);
18
18
  name: any;
19
19
  navigable: any;
20
20
  /** @type {?StateObject} */
@@ -24,9 +24,9 @@ export class StateObject implements StateDeclaration {
24
24
  includes: any;
25
25
  $$state: () => this;
26
26
  /**
27
- * @type {import('./interface.js').StateDeclaration}
27
+ * @type {import('./interface.ts').StateDeclaration}
28
28
  */
29
- self: import("./interface.js").StateDeclaration;
29
+ self: import("./interface.ts").StateDeclaration;
30
30
  __stateObjectCache: {
31
31
  nameGlob: Glob;
32
32
  };
@@ -79,5 +79,5 @@ export namespace StateObject {
79
79
  /** Predicate which returns true if the object is an internal [[StateObject]] object */
80
80
  function isState(obj: any): boolean;
81
81
  }
82
- export type StateDeclaration = import("./interface.js").StateDeclaration;
82
+ export type StateDeclaration = import("./interface.ts").StateDeclaration;
83
83
  import { Glob } from "../glob/glob.js";
@@ -27,7 +27,7 @@ export class StateProvider {
27
27
  *
28
28
  * @deprecated This is a passthrough through to [[Router.current]]
29
29
  */
30
- get current(): import("./interface.js").StateDeclaration;
30
+ get current(): import("./interface.ts").StateDeclaration;
31
31
  /**
32
32
  * The current [[StateObject]] (an internal API)
33
33
  *
@@ -134,9 +134,9 @@ export class StateProvider {
134
134
  decorator(name: string, func: object): object;
135
135
  /**
136
136
  *
137
- * @param {import("./interface.js").StateDeclaration} definition
137
+ * @param {import("./interface.ts").StateDeclaration} definition
138
138
  */
139
- state(definition: import("./interface.js").StateDeclaration): this;
139
+ state(definition: import("./interface.ts").StateDeclaration): this;
140
140
  /**
141
141
  * Handler for when [[transitionTo]] is called with an invalid state.
142
142
  *
@@ -20,7 +20,7 @@ export class TemplateFactoryProvider {
20
20
  )[];
21
21
  $templateRequest: any;
22
22
  $http: import("../interface.ts").HttpService;
23
- $templateCache: Map<string, string>;
23
+ $templateCache: ng.TemplateCacheService;
24
24
  $injector: import("../core/di/internal-injector.js").InjectorService;
25
25
  /**
26
26
  * Forces the provider to use $http service directly
@@ -45,4 +45,4 @@ export class HookBuilder {
45
45
  */
46
46
  getMatchingHooks(hookType: any, treeChanges: any, transition: any): any;
47
47
  }
48
- import { TransitionHookPhase } from "./interface.js";
48
+ import { TransitionHookPhase } from "./transition-hook.js";
@@ -5,6 +5,7 @@ import { StateObject } from "../state/state-object.js";
5
5
  import { PathNode } from "../path/path-node.js";
6
6
  import { TargetState } from "../state/target-state.js";
7
7
  import { RegisteredHook } from "./hook-registry.js";
8
+ import { TransitionHookScope } from "./transition-hook.js";
8
9
  /**
9
10
  * The TransitionOptions object can be used to change the behavior of a transition.
10
11
  *
@@ -866,15 +867,3 @@ export interface PathType {
866
867
  * Or, `true` to always match
867
868
  */
868
869
  export type HookMatchCriterion = string | IStateMatch | boolean;
869
- declare enum TransitionHookPhase {
870
- CREATE = 0,
871
- BEFORE = 1,
872
- RUN = 2,
873
- SUCCESS = 3,
874
- ERROR = 4,
875
- }
876
- declare enum TransitionHookScope {
877
- TRANSITION = 0,
878
- STATE = 1,
879
- }
880
- export { TransitionHookPhase, TransitionHookScope };
@@ -1,3 +1,34 @@
1
+ /**
2
+ * Enum representing the different phases of a transition hook.
3
+ */
4
+ export type TransitionHookPhase = number;
5
+ /**
6
+ * Enum representing the different phases of a transition hook.
7
+ *
8
+ * @readonly
9
+ * @enum {number}
10
+ */
11
+ export const TransitionHookPhase: Readonly<{
12
+ CREATE: 0;
13
+ BEFORE: 1;
14
+ RUN: 2;
15
+ SUCCESS: 3;
16
+ ERROR: 4;
17
+ }>;
18
+ /**
19
+ * Enum representing the scope in which a transition hook operates.
20
+ */
21
+ export type TransitionHookScope = number;
22
+ /**
23
+ * Enum representing the scope in which a transition hook operates.
24
+ *
25
+ * @readonly
26
+ * @enum {number}
27
+ */
28
+ export const TransitionHookScope: Readonly<{
29
+ TRANSITION: 0;
30
+ STATE: 1;
31
+ }>;
1
32
  export class TransitionHook {
2
33
  /**
3
34
  * Chains together an array of TransitionHooks.
@@ -117,4 +117,4 @@ export class TransitionProvider {
117
117
  _registerCoreTransitionHooks(): void;
118
118
  }
119
119
  import { Transition } from "./transition.js";
120
- import { TransitionHookPhase } from "./interface.js";
120
+ import { TransitionHookPhase } from "./transition-hook.js";
@@ -47,7 +47,7 @@ export class Transition implements IHookRegistry {
47
47
  _targetState: import("../state/target-state.js").TargetState;
48
48
  _options: any;
49
49
  $id: number;
50
- _treeChanges: import("./interface.js").TreeChanges;
50
+ _treeChanges: import("./interface.ts").TreeChanges;
51
51
  onStart: any;
52
52
  onBefore: any;
53
53
  onSuccess: any;
@@ -251,7 +251,7 @@ export class Transition implements IHookRegistry {
251
251
  pathname: any,
252
252
  ):
253
253
  | import("../path/path-node.js").PathNode[]
254
- | import("./interface.js").TreeChanges;
254
+ | import("./interface.ts").TreeChanges;
255
255
  /**
256
256
  * Creates a new transition that is a redirection of the current one.
257
257
  *
@@ -1,4 +1,4 @@
1
- /** @typedef {import('../../interface.js').ServiceProvider} ServiceProvider
1
+ /** @typedef {import('../../interface.ts').ServiceProvider} ServiceProvider
2
2
 
3
3
  /**
4
4
  * Configurable provider for an injectable event bus
@@ -182,4 +182,4 @@ export const EventBus: PubSub;
182
182
  * /**
183
183
  * Configurable provider for an injectable event bus
184
184
  */
185
- export type ServiceProvider = import("../../interface.js").ServiceProvider;
185
+ export type ServiceProvider = import("../../interface.ts").ServiceProvider;