Skip to content

Commit 1a6cdfc

Browse files
fix(noImplicitAny): Fix noimplicitany compliance
Closes angular-ui/ui-router#2693
1 parent fe8505e commit 1a6cdfc

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/common/common.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ function _arraysEq(a1: any[], a2: any[]) {
617617
return arrayTuples(a1, a2).reduce((b, t) => b && _equals(t[0], t[1]), true);
618618
}
619619

620-
export type sortfn = (a,b) => number;
620+
export type sortfn = (a: any, b: any) => number;
621621

622622
/**
623623
* Create a sort function

src/resolve/resolveContext.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const when = resolvePolicies.when;
1717
const ALL_WHENS = [when.EAGER, when.LAZY];
1818
const EAGER_WHENS = [when.EAGER];
1919

20-
export const NATIVE_INJECTOR_TOKEN = "Native Injector";
20+
export const NATIVE_INJECTOR_TOKEN: string = "Native Injector";
2121

2222
/**
2323
* Encapsulates Dependency Injection for a path of nodes

src/transition/transitionHook.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ let defaultOptions: TransitionHookOptions = {
2727
export type GetResultHandler = (hook: TransitionHook) => ResultHandler;
2828
export type GetErrorHandler = (hook: TransitionHook) => ErrorHandler;
2929

30-
export type ResultHandler = (result: HookResult) => Promise<HookResult>;
31-
export type ErrorHandler = (error) => Promise<any>;
30+
export type ResultHandler = (result: HookResult) => Promise<HookResult>;
31+
export type ErrorHandler = (error: any) => Promise<any>;
3232

3333
/** @hidden */
3434
export class TransitionHook {
@@ -62,13 +62,13 @@ export class TransitionHook {
6262
* These GetErrorHandler(s) are used by [[invokeHook]] below
6363
* Each HookType chooses a GetErrorHandler (See: [[TransitionService._defineCoreEvents]])
6464
*/
65-
static LOG_ERROR: GetErrorHandler = (hook: TransitionHook) => (error) =>
65+
static LOG_ERROR: GetErrorHandler = (hook: TransitionHook) => (error: any) =>
6666
hook.logError(error);
6767

68-
static REJECT_ERROR: GetErrorHandler = (hook: TransitionHook) => (error) =>
68+
static REJECT_ERROR: GetErrorHandler = (hook: TransitionHook) => (error: any) =>
6969
silentRejection(error);
7070

71-
static THROW_ERROR: GetErrorHandler = (hook: TransitionHook) => (error) => {
71+
static THROW_ERROR: GetErrorHandler = (hook: TransitionHook) => (error: any) => {
7272
throw error;
7373
};
7474

tslint.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"no-trailing-comma": true,
3636
"no-trailing-whitespace": false,
3737
"no-unreachable": true,
38-
"no-unused-expression": true,
38+
"no-unused-expression": [true, "allow-fast-null-checks"],
3939
"no-unused-variable": true,
4040
"no-use-before-declare": true,
4141
"no-var-keyword": true,

0 commit comments

Comments
 (0)