Skip to content

Commit cd9bcea

Browse files
committed
Type fixes
1 parent bd1a495 commit cd9bcea

File tree

115 files changed

+3323
-32
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+3323
-32
lines changed

@types/namespace.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ import {
104104
import { StateObject as TStateObject } from "./router/state/state-object.js";
105105
import { StateRegistryProvider as TStateRegistryProvider } from "./router/state/state-registry.js";
106106
import { IViewScrollService } from "./router/scroll/interface.ts";
107+
import { HookRegistry } from "./router/transition/interface.ts";
107108
declare global {
108109
interface Function {
109110
$inject?: readonly string[] | undefined;
@@ -163,7 +164,7 @@ declare global {
163164
type StateRegistryService = TStateRegistryProvider;
164165
type SseService = TSseService;
165166
type SseConfig = TSseConfig;
166-
type TransitionService = TTransitionProvider;
167+
type TransitionService = TransitionProvider & HookRegistry;
167168
type TemplateCacheService = Map<string, string>;
168169
type TemplateRequestService = TTemplateRequestService;
169170
type UrlService = TUrlService;

@types/router/state/state-builder.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@
3838
* new Resolvable("myBarResolve", function(dep) { return dep.fetchSomethingAsPromise() }, [ "DependencyName" ]),
3939
* { provide: "myBazResolve", useFactory: function(dep) { dep.fetchSomethingAsPromise() }, deps: [ "DependencyName" ] }
4040
* ]
41-
* @param {ng.StateObject} state
41+
* @param {ng.StateObject & ng.StateDeclaration} state
4242
*/
43-
export function resolvablesBuilder(state: ng.StateObject): any[];
43+
export function resolvablesBuilder(
44+
state: ng.StateObject & ng.StateDeclaration,
45+
): any[];
4446
/**
4547
* A internal global service
4648
*

@types/router/transition/interface.d.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,11 @@ export type IHookRegistration = (
168168
*
169169
* #### See:
170170
*
171-
* - [[IHookRegistry.onBefore]]
172-
* - [[IHookRegistry.onStart]]
173-
* - [[IHookRegistry.onFinish]]
174-
* - [[IHookRegistry.onSuccess]]
175-
* - [[IHookRegistry.onError]]
171+
* - [[HookRegistry.onBefore]]
172+
* - [[HookRegistry.onStart]]
173+
* - [[HookRegistry.onFinish]]
174+
* - [[HookRegistry.onSuccess]]
175+
* - [[HookRegistry.onError]]
176176
*
177177
* @param transition the current [[Transition]]
178178
* @param injector (for ng1 or ng2 only) the injector service
@@ -196,9 +196,9 @@ export interface TransitionHookFn {
196196
*
197197
* #### See also:
198198
*
199-
* - [[IHookRegistry.onExit]]
200-
* - [[IHookRegistry.onRetain]]
201-
* - [[IHookRegistry.onEnter]]
199+
* - [[HookRegistry.onExit]]
200+
* - [[HookRegistry.onRetain]]
201+
* - [[HookRegistry.onEnter]]
202202
*
203203
* #### Example:
204204
* ```js
@@ -287,7 +287,7 @@ export interface HookRegOptions {
287287
* [[TransitionService]] and also the [[Transition]] object itself implement this interface.
288288
* Note: the Transition object only allows hooks to be registered before the Transition is started.
289289
*/
290-
export interface IHookRegistry {
290+
export interface HookRegistry {
291291
/**
292292
* Registers a [[TransitionHookFn]], called *before a transition starts*.
293293
*

@types/router/transition/transition.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
*
66
* This object contains all contextual information about the to/from states, parameters, resolves.
77
* It has information about all states being entered and exited as a result of the transition.
8-
* @implements {IHookRegistry}
8+
* @implements {HookRegistry}
99
*/
10-
export class Transition implements IHookRegistry {
10+
export class Transition implements HookRegistry {
1111
/**
1212
* Creates a new Transition object.
1313
*
@@ -330,5 +330,5 @@ export class Transition implements IHookRegistry {
330330
export namespace Transition {
331331
export { Transition as diToken };
332332
}
333-
export type IHookRegistry = import("./interface.ts").IHookRegistry;
333+
export type HookRegistry = import("./interface.ts").HookRegistry;
334334
import { HookBuilder } from "./hook-builder.js";

docs/static/typedoc/.nojekyll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.

docs/static/typedoc/assets/hierarchy.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
:root {
2+
--light-hl-0: #800000;
3+
--dark-hl-0: #808080;
4+
--light-hl-1: #800000;
5+
--dark-hl-1: #569CD6;
6+
--light-hl-2: #000000;
7+
--dark-hl-2: #D4D4D4;
8+
--light-hl-3: #E50000;
9+
--dark-hl-3: #9CDCFE;
10+
--light-hl-4: #0000FF;
11+
--dark-hl-4: #CE9178;
12+
--light-hl-5: #000000FF;
13+
--dark-hl-5: #D4D4D4;
14+
--light-hl-6: #0000FF;
15+
--dark-hl-6: #569CD6;
16+
--light-hl-7: #001080;
17+
--dark-hl-7: #9CDCFE;
18+
--light-hl-8: #795E26;
19+
--dark-hl-8: #DCDCAA;
20+
--light-hl-9: #A31515;
21+
--dark-hl-9: #CE9178;
22+
--light-hl-10: #008000;
23+
--dark-hl-10: #6A9955;
24+
--light-code-background: #FFFFFF;
25+
--dark-code-background: #1E1E1E;
26+
}
27+
28+
@media (prefers-color-scheme: light) { :root {
29+
--hl-0: var(--light-hl-0);
30+
--hl-1: var(--light-hl-1);
31+
--hl-2: var(--light-hl-2);
32+
--hl-3: var(--light-hl-3);
33+
--hl-4: var(--light-hl-4);
34+
--hl-5: var(--light-hl-5);
35+
--hl-6: var(--light-hl-6);
36+
--hl-7: var(--light-hl-7);
37+
--hl-8: var(--light-hl-8);
38+
--hl-9: var(--light-hl-9);
39+
--hl-10: var(--light-hl-10);
40+
--code-background: var(--light-code-background);
41+
} }
42+
43+
@media (prefers-color-scheme: dark) { :root {
44+
--hl-0: var(--dark-hl-0);
45+
--hl-1: var(--dark-hl-1);
46+
--hl-2: var(--dark-hl-2);
47+
--hl-3: var(--dark-hl-3);
48+
--hl-4: var(--dark-hl-4);
49+
--hl-5: var(--dark-hl-5);
50+
--hl-6: var(--dark-hl-6);
51+
--hl-7: var(--dark-hl-7);
52+
--hl-8: var(--dark-hl-8);
53+
--hl-9: var(--dark-hl-9);
54+
--hl-10: var(--dark-hl-10);
55+
--code-background: var(--dark-code-background);
56+
} }
57+
58+
:root[data-theme='light'] {
59+
--hl-0: var(--light-hl-0);
60+
--hl-1: var(--light-hl-1);
61+
--hl-2: var(--light-hl-2);
62+
--hl-3: var(--light-hl-3);
63+
--hl-4: var(--light-hl-4);
64+
--hl-5: var(--light-hl-5);
65+
--hl-6: var(--light-hl-6);
66+
--hl-7: var(--light-hl-7);
67+
--hl-8: var(--light-hl-8);
68+
--hl-9: var(--light-hl-9);
69+
--hl-10: var(--light-hl-10);
70+
--code-background: var(--light-code-background);
71+
}
72+
73+
:root[data-theme='dark'] {
74+
--hl-0: var(--dark-hl-0);
75+
--hl-1: var(--dark-hl-1);
76+
--hl-2: var(--dark-hl-2);
77+
--hl-3: var(--dark-hl-3);
78+
--hl-4: var(--dark-hl-4);
79+
--hl-5: var(--dark-hl-5);
80+
--hl-6: var(--dark-hl-6);
81+
--hl-7: var(--dark-hl-7);
82+
--hl-8: var(--dark-hl-8);
83+
--hl-9: var(--dark-hl-9);
84+
--hl-10: var(--dark-hl-10);
85+
--code-background: var(--dark-code-background);
86+
}
87+
88+
.hl-0 { color: var(--hl-0); }
89+
.hl-1 { color: var(--hl-1); }
90+
.hl-2 { color: var(--hl-2); }
91+
.hl-3 { color: var(--hl-3); }
92+
.hl-4 { color: var(--hl-4); }
93+
.hl-5 { color: var(--hl-5); }
94+
.hl-6 { color: var(--hl-6); }
95+
.hl-7 { color: var(--hl-7); }
96+
.hl-8 { color: var(--hl-8); }
97+
.hl-9 { color: var(--hl-9); }
98+
.hl-10 { color: var(--hl-10); }
99+
pre, code { background: var(--code-background); }

docs/static/typedoc/assets/icons.js

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)