Skip to content

Commit 81d8865

Browse files
committed
Type fixes
1 parent 90e2c67 commit 81d8865

File tree

134 files changed

+257
-3408
lines changed

Some content is hidden

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

134 files changed

+257
-3408
lines changed

@types/core/compile/attributes.d.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,13 @@ export class Attributes {
8787
$observe(key: string, fn: any): () => any;
8888
$$observers: any;
8989
setSpecialAttr(element: any, attrName: any, value: any): void;
90-
sanitizeSrcset(value: any, invokeType: any): any;
91-
srcset: any;
90+
/**
91+
*
92+
* @param {unknown} value
93+
* @param {string} invokeType
94+
* @returns {unknown}
95+
*/
96+
sanitizeSrcset(value: unknown, invokeType: string): unknown;
97+
srcset: unknown;
9298
}
9399
import { directiveNormalize } from "../../shared/utils.js";

@types/directive/messages/messages.d.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ export function ngMessagesDirective(
88
export namespace ngMessagesDirective {
99
let $inject: string[];
1010
}
11+
/**
12+
* @param {ng.TemplateRequestService} $templateRequest
13+
* @param {ng.CompileService} $compile
14+
* @returns {ng.Directive}
15+
*/
1116
export function ngMessagesIncludeDirective(
12-
$templateRequest: any,
13-
$compile: any,
14-
): {
15-
restrict: string;
16-
require: string;
17-
link($scope: any, element: any, attrs: any): void;
18-
};
17+
$templateRequest: ng.TemplateRequestService,
18+
$compile: ng.CompileService,
19+
): ng.Directive;
1920
export namespace ngMessagesIncludeDirective {
2021
let $inject_1: string[];
2122
export { $inject_1 as $inject };

@types/directive/options/options.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ export function ngOptionsDirective(
99
$parse: ng.ParseService,
1010
): ng.Directive;
1111
export namespace ngOptionsDirective {
12-
let $inject: string[];
12+
let $inject: any[];
1313
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/**
22
* @param {ng.TemplateCacheService} $templateCache
3-
* @returns {import('../../interface.ts').Directive}
3+
* @returns {ng.Directive}
44
*/
55
export function scriptDirective(
66
$templateCache: ng.TemplateCacheService,
7-
): import("../../interface.ts").Directive;
7+
): ng.Directive;
88
export namespace scriptDirective {
9-
let $inject: string[];
9+
let $inject: any[];
1010
}

@types/directive/select/select.d.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
* @returns {import('../../interface.ts').Directive}
33
*/
44
export function selectDirective(): import("../../interface.ts").Directive;
5-
export function optionDirective($interpolate: any): {
6-
restrict: string;
7-
priority: number;
8-
compile(
9-
element: any,
10-
attr: any,
11-
): (scope: any, elemParam: any, attrParam: any) => void;
12-
};
5+
/**
6+
* @param {ng.InterpolateService} $interpolate
7+
* @returns {ng.Directive}
8+
*/
9+
export function optionDirective(
10+
$interpolate: ng.InterpolateService,
11+
): ng.Directive;
1312
export namespace optionDirective {
1413
let $inject: string[];
1514
}

@types/directive/show-hide/show-hide.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55
export function ngShowDirective($animate: ng.AnimateService): ng.Directive;
66
export namespace ngShowDirective {
7-
let $inject: string[];
7+
let $inject: any[];
88
}
99
/**
1010
* @returns {import('../../interface.ts').Directive}
@@ -13,6 +13,6 @@ export function ngHideDirective(
1313
$animate: any,
1414
): import("../../interface.ts").Directive;
1515
export namespace ngHideDirective {
16-
let $inject_1: string[];
16+
let $inject_1: any[];
1717
export { $inject_1 as $inject };
1818
}

@types/namespace.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ import { LocationProvider as TLocationProvider } from "./services/location/locat
9797
import { ViewService as TViewService } from "./router/view/view.js";
9898
import { StateDeclaration as TStateDeclaration } from "./router/state/interface.ts";
9999
import { StateObject as TStateObject } from "./router/state/state-object.js";
100+
import { StateRegistryProvider as TStateRegistryProvider } from "./router/state/state-registry.js";
100101
declare global {
101102
interface Function {
102103
$inject?: readonly string[] | undefined;
@@ -153,8 +154,10 @@ declare global {
153154
type RootScopeService = TScope & Record<string, any>;
154155
type RouterService = RouterProvider;
155156
type StateService = TStateProvider;
157+
type StateRegistryService = TStateRegistryProvider;
156158
type SseService = TSseService;
157159
type SseConfig = TSseConfig;
160+
type TransitionService = TTransitionProvider;
158161
type TemplateCacheService = Map<string, string>;
159162
type TemplateRequestService = TTemplateRequestService;
160163
type UrlService = TUrlService;

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

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,43 @@
1+
/**
2+
* @param {ng.StateService} $stateService
3+
* @param {ng.StateRegistryService} $stateRegistry
4+
* @param {ng.TransitionService} $transitions
5+
* @returns {ng.Directive}
6+
*/
17
export function $StateRefDirective(
2-
$stateService: any,
3-
$stateRegistry: any,
4-
$transitions: any,
5-
): {
6-
restrict: string;
7-
require: string[];
8-
link: (scope: any, element: any, attrs: any, ngSrefActive: any) => void;
9-
};
8+
$stateService: ng.StateService,
9+
$stateRegistry: ng.StateRegistryService,
10+
$transitions: ng.TransitionService,
11+
): ng.Directive;
1012
export namespace $StateRefDirective {
1113
let $inject: string[];
1214
}
1315
/**
14-
* @param $state
15-
* @param $stateRegistry
16-
* @param $transitions
16+
* @param {ng.StateService} $state
17+
* @param {ng.StateRegistryService} $stateRegistry
18+
* @param {ng.TransitionService} $transitions
1719
* @returns {ng.Directive}
1820
*/
1921
export function $StateRefDynamicDirective(
20-
$state: any,
21-
$stateRegistry: any,
22-
$transitions: any,
22+
$state: ng.StateService,
23+
$stateRegistry: ng.StateRegistryService,
24+
$transitions: ng.TransitionService,
2325
): ng.Directive;
2426
export namespace $StateRefDynamicDirective {
2527
let $inject_1: string[];
2628
export { $inject_1 as $inject };
2729
}
2830
/**
29-
* @param {*} $state
30-
* @param {import('../router.js').RouterProvider} $router
31+
* @param {ng.StateService} $state
32+
* @param {ng.RouterService} $router
3133
* @param {ng.InterpolateService} $interpolate
3234
* @param {*} $stateRegistry
3335
* @param {*} $transitions
3436
* @returns {ng.Directive}
3537
*/
3638
export function $StateRefActiveDirective(
37-
$state: any,
38-
$router: import("../router.js").RouterProvider,
39+
$state: ng.StateService,
40+
$router: ng.RouterService,
3941
$interpolate: ng.InterpolateService,
4042
$stateRegistry: any,
4143
$transitions: any,

@types/router/directives/view-directive.d.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
11
/**
22
* @param {ng.ViewService} $view
33
* @param {ng.AnimateService} $animate
4-
* @param {*} $viewScroll
4+
* @param {ng.AnchorScrollService} $viewScroll
55
* @param {ng.InterpolateService} $interpolate
66
* @returns {ng.Directive}
77
*/
88
export function $ViewDirective(
99
$view: ng.ViewService,
1010
$animate: ng.AnimateService,
11-
$viewScroll: any,
11+
$viewScroll: ng.AnchorScrollService,
1212
$interpolate: ng.InterpolateService,
1313
): ng.Directive;
1414
export namespace $ViewDirective {
1515
let $inject: string[];
1616
}
17+
/**
18+
* @param {ng.CompileService} $compile
19+
* @param {ng.ControllerService} $controller
20+
* @param {ng.TransitionService} $transitions
21+
* @returns
22+
*/
1723
export function $ViewDirectiveFill(
18-
$compile: any,
19-
$controller: any,
20-
$transitions: any,
24+
$compile: ng.CompileService,
25+
$controller: ng.ControllerService,
26+
$transitions: ng.TransitionService,
2127
): {
2228
priority: number;
2329
compile(tElement: any): (scope: any, $element: any) => void;

@types/services/sce/sce.d.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
export function escapeForRegexp(str: any): any;
2-
export function adjustMatcher(matcher: any): any;
2+
/**
3+
* Adjusts a matcher string or RegExp into a proper RegExp.
4+
*
5+
* @param {string | RegExp | "self"} matcher
6+
* @returns {RegExp | "self"}
7+
*/
8+
export function adjustMatcher(
9+
matcher: string | RegExp | "self",
10+
): RegExp | "self";
311
export function SceProvider(): void;
412
export class SceProvider {
513
/**

0 commit comments

Comments
 (0)