Skip to content

Commit 758aebe

Browse files
committed
Type improvements
1 parent 7f762f4 commit 758aebe

File tree

33 files changed

+268
-374
lines changed

33 files changed

+268
-374
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/**
2-
* @param {*} $interpolate
3-
* @returns {import("../interface.ts").Directive}
2+
* @param {ng.InterpolateService} $interpolate
3+
* @returns {ng.Directive}
44
*/
55
export function $$AnimateChildrenDirective(
6-
$interpolate: any,
7-
): import("../interface.ts").Directive;
6+
$interpolate: ng.InterpolateService,
7+
): ng.Directive;
88
export namespace $$AnimateChildrenDirective {
99
let $inject: string[];
1010
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export class CompileProvider {
125125
| string
126126
| ((
127127
$injector: ng.InjectorService,
128-
$interpolate: any,
128+
$interpolate: ng.InterpolateService,
129129
$exceptionHandler: ng.ExceptionHandlerService,
130130
$templateRequest: ng.TemplateRequestService,
131131
$parse: ng.ParseService,

@types/core/interpolate/interface.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export interface InterpolationFunction {
2+
expressions: any[];
23
(context: any): string;
34
}
45
export interface InterpolateService {

@types/directive/attrs/attrs.d.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
export const REGEX_STRING_REGEXP: RegExp;
22
/**
3-
* @type {Record<string, import("../../interface.ts").DirectiveFactory>}
3+
* @type {Record<string, ng.DirectiveFactory>}
44
*/
5-
export const ngAttributeAliasDirectives: Record<
6-
string,
7-
import("../../interface.ts").DirectiveFactory
8-
>;
5+
export const ngAttributeAliasDirectives: Record<string, ng.DirectiveFactory>;

@types/directive/class/class.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export const ngClassDirective: ng.DirectiveFactory;
2-
export const ngClassOddDirective: ng.DirectiveFactory;
3-
export const ngClassEvenDirective: ng.DirectiveFactory;
1+
export const ngClassDirective: import("../../interface.ts").DirectiveFactory;
2+
export const ngClassOddDirective: import("../../interface.ts").DirectiveFactory;
3+
export const ngClassEvenDirective: import("../../interface.ts").DirectiveFactory;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/**
2-
* @returns {import("../../interface.ts").Directive}
2+
* @returns {ng.Directive}
33
*/
4-
export function ngControllerDirective(): import("../../interface.ts").Directive;
4+
export function ngControllerDirective(): ng.Directive;

@types/directive/form/form.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,17 @@ export class FormController {
7878
* @param {ng.Attributes} $attrs
7979
* @param {ng.Scope} $scope
8080
* @param {ng.AnimateService} $animate
81-
* @param {*} $interpolate
81+
* @param {ng.InterpolateService} $interpolate
8282
*/
8383
constructor(
8484
$element: Element,
8585
$attrs: ng.Attributes,
8686
$scope: ng.Scope,
8787
$animate: ng.AnimateService,
88-
$interpolate: any,
88+
$interpolate: ng.InterpolateService,
8989
);
9090
$$controls: any[];
91-
$name: any;
91+
$name: string;
9292
/**
9393
* @property {boolean} $dirty True if user has already interacted with the form.
9494
*/

@types/directive/include/include.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ export namespace ngIncludeDirective {
1717
}
1818
/**
1919
* @param {ng.CompileService} $compile
20-
* @returns {import("../../interface.ts").Directive}
20+
* @returns {ng.Directive}
2121
*/
2222
export function ngIncludeFillContentDirective(
2323
$compile: ng.CompileService,
24-
): import("../../interface.ts").Directive;
24+
): ng.Directive;
2525
export namespace ngIncludeFillContentDirective {
2626
let $inject_1: string[];
2727
export { $inject_1 as $inject };

@types/directive/model/model.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class NgModelController {
5555
* @param {Element} $element
5656
* @param {ng.ParseService} $parse
5757
* @param {ng.AnimateService} $animate
58-
* @param {*} $interpolate
58+
* @param {ng.InterpolateService} $interpolate
5959
*/
6060
constructor(
6161
$scope: ng.Scope,
@@ -64,7 +64,7 @@ export class NgModelController {
6464
$element: Element,
6565
$parse: ng.ParseService,
6666
$animate: ng.AnimateService,
67-
$interpolate: any,
67+
$interpolate: ng.InterpolateService,
6868
);
6969
/** @type {any} The actual value from the control's view */
7070
$viewValue: any;
@@ -97,7 +97,7 @@ export class NgModelController {
9797
$error: {};
9898
$$success: {};
9999
$pending: any;
100-
$name: any;
100+
$name: string;
101101
$$parentForm: {
102102
$nonscope: boolean;
103103
$addControl: Function;
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
/**
22
* TODO // Add type for animate service
33
* @param {*} $animate
4-
* @returns {import("../../interface.ts").Directive}
4+
* @returns {ng.Directive}
55
*/
6-
export function ngRepeatDirective(
7-
$animate: any,
8-
): import("../../interface.ts").Directive;
6+
export function ngRepeatDirective($animate: any): ng.Directive;
97
export namespace ngRepeatDirective {
108
let $inject: string[];
119
}

0 commit comments

Comments
 (0)