Skip to content

Commit 272bb08

Browse files
committed
Cont lint and type fixes
1 parent 0a6f1c8 commit 272bb08

File tree

45 files changed

+347
-462
lines changed

Some content is hidden

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

45 files changed

+347
-462
lines changed

.husky/pre-commit

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
make lint
2-
make check
31
make types
42
make pretty
53
git add ./

@types/angular.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export class Angular {
129129
modules?: Array<string | any>,
130130
config?: import("./interface.ts").AngularBootstrapConfig,
131131
): ng.InjectorService;
132-
$rootScope: import("./interface.ts").Scope;
132+
$rootScope: ng.Scope;
133133
$injector: import("./interface.ts").InjectorService;
134134
/**
135135
* @param {any[]} modules

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class Attributes {
1616
nodeRef?: import("../../shared/noderef.js").NodeRef,
1717
attributesToCopy?: any,
1818
);
19-
$rootScope: import("../scope/scope.js").Scope;
19+
$rootScope: ng.RootScopeService;
2020
$animate: import("../../interface.ts").AnimateService;
2121
$exceptionHandler: import("../../interface.ts").ExceptionHandler;
2222
$sce: any;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export interface AsyncQueueTask {
77
}
88
export type ListenerFn = (newValue?: any, originalTarget?: object) => void;
99
export interface Listener {
10-
originalTarget: Scope;
10+
originalTarget: any;
1111
listenerFn: ListenerFn;
1212
watchFn: CompiledExpression;
1313
id: number;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ declare class NgMessageCtrl {
3737
$animate: ng.AnimateService,
3838
);
3939
$element: Element;
40-
$scope: import("../../interface.ts").Scope;
40+
$scope: ng.Scope;
4141
$attrs: ng.Attributes;
4242
$animate: import("../../interface.ts").AnimateService;
4343
latestKey: number;

@types/namespace.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ declare global {
9898
type DirectiveFactory = TDirectiveFactory;
9999
type Component = TComponent;
100100
type Controller = TController;
101-
type Scope = TScope;
101+
type Scope = TScope & Record<string, any>;
102102
type NgModule = TNgModule;
103103
type PubSubProvider = TPubSubProvider;
104104
type CompositeLinkFn = TCompositeLinkFn;
@@ -133,7 +133,7 @@ declare global {
133133
type ProvideService = TProvideService;
134134
type PubSubService = TPubSub;
135135
type RootElementService = Element;
136-
type RootScopeService = TScope;
136+
type RootScopeService = TScope & Record<string, any>;
137137
type StateService = TStateProvider;
138138
type SseService = TSseService;
139139
type SseConfig = TSseConfig;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export function $ViewDirectiveFill(
44
$transitions: any,
55
): {
66
priority: number;
7-
compile: (tElement: any) => (scope: any, $element: any) => void;
7+
compile(tElement: any): (scope: any, $element: any) => void;
88
};
99
export namespace $ViewDirectiveFill {
1010
let $inject: string[];
@@ -135,4 +135,4 @@ export namespace $ViewDirectiveFill {
135135
* ```
136136
*/
137137
/** @type {import("../../interface.ts").AnnotatedDirectiveFactory} */
138-
export let ngView: import("../../interface.ts").AnnotatedDirectiveFactory;
138+
export const ngView: import("../../interface.ts").AnnotatedDirectiveFactory;

@types/router/url/url-rule.d.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
/**
2-
* Creates a [[UrlRule]]
3-
*
4-
* Creates a [[UrlRule]] from a:
5-
*
6-
* - `string`
7-
* - [[UrlMatcher]]
8-
* - `RegExp`
9-
* - [[StateObject]]
10-
*/
111
export class UrlRuleFactory {
122
/**
133
* @param {import('../url/url-service.js').UrlService} urlService

@types/router/view/view.d.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
/**
2-
* The View service
3-
*
4-
* This service pairs existing `ng-view` components (which live in the DOM)
5-
* with view configs (from the state declaration objects: [[StateDeclaration.views]]).
6-
*
7-
* - After a successful Transition, the views from the newly entered states are activated via [[activateViewConfig]].
8-
* The views from exited states are deactivated via [[deactivateViewConfig]].
9-
* (See: the [[registerActivateViews]] Transition Hook)
10-
*
11-
* - As `ng-view` components pop in and out of existence, they register themselves using [[registerUIView]].
12-
*
13-
* - When the [[sync]] function is called, the registered `ng-view`(s) ([[ActiveUIView]])
14-
* are configured with the matching [[ViewConfig]](s)
15-
*
16-
*/
171
export class ViewService {
182
_ngViews: any[];
193
_viewConfigs: any[];

@types/services/http/http.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,8 @@ export function http(
171171
eventHandlers?: Record<string, EventListener>,
172172
uploadEventHandlers?: Record<string, EventListener>,
173173
): void;
174+
export const Http: Readonly<{
175+
OK: 200;
176+
MultipleChoices: 300;
177+
NotFound: 404;
178+
}>;

0 commit comments

Comments
 (0)