Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use type unknown instead of any
- Loading branch information
Showing
6 changed files
with
44 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export declare function register(name: string, value: any): void; | ||
export declare function register(name: string, value: unknown): void; | ||
export declare function unregister(name: string): void; | ||
export declare function request(name: string): any; | ||
export declare function request(name: string): unknown; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export declare function verify(condition: boolean, message?: string, code?: number, exception?: any, kwargs?: any): void; | ||
export declare function verify(condition: boolean, message?: string, code?: number, exception?: unknown, kwargs?: unknown): void; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export declare function load(names?: Array<string>, path?: string, encoding?: string, force?: boolean, ctx?: any): Promise<void>; | ||
export declare function conf(name: string, fallback?: any, cast?: string, ctx?: any): any; | ||
export declare function load(names?: Array<string>, path?: string, encoding?: string, force?: boolean, ctx?: unknown): Promise<void>; | ||
export declare function conf(name: string, fallback?: unknown, cast?: string, ctx?: unknown): unknown; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
export declare function getObject( | ||
params: Record<string, any>, | ||
params: Record<string, unknown>, | ||
options: { | ||
alias?: boolean, | ||
page?: boolean, | ||
find?: boolean, | ||
norm?: boolean | ||
} | ||
): Record<string, any>; | ||
): Record<string, unknown>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,63 @@ | ||
export declare function eq<T>( | ||
valueC: T, | ||
message?: string | ||
): (value?: T, ctx?: any) => boolean; | ||
): (value?: T, ctx?: unknown) => boolean; | ||
|
||
export declare function gt<T>( | ||
valueC: T, | ||
message?: string | ||
): (value?: T, ctx?: any) => boolean; | ||
): (value?: T, ctx?: unknown) => boolean; | ||
|
||
export declare function gte<T>( | ||
valueC: T, | ||
message?: string | ||
): (value?: T, ctx?: any) => boolean; | ||
): (value?: T, ctx?: unknown) => boolean; | ||
|
||
export declare function notEmpty( | ||
message?: string | ||
): (value?: string | unknown[], ctx?: any) => boolean; | ||
): (value?: string | unknown[], ctx?: unknown) => boolean; | ||
|
||
export declare function isIn<T>( | ||
valueC: T[], | ||
message?: string | ||
): (value?: T, ctx?: any) => boolean; | ||
): (value?: T, ctx?: unknown) => boolean; | ||
|
||
export declare function isUpper( | ||
message?: string | ||
): (value?: string, ctx?: unknown) => boolean; | ||
|
||
export declare function isLower( | ||
message?: string | ||
): (value?: string, ctx?: unknown) => boolean; | ||
|
||
export declare function isSimple( | ||
message?: string | ||
): (value?: string, ctx?: any) => boolean; | ||
): (value?: string, ctx?: unknown) => boolean; | ||
|
||
export declare function isEmail( | ||
message?: string | ||
): (value?: string, ctx?: any) => boolean; | ||
): (value?: string, ctx?: unknown) => boolean; | ||
|
||
export declare function isUrl( | ||
message?: string | ||
): (value?: string, ctx?: any) => boolean; | ||
): (value?: string, ctx?: unknown) => boolean; | ||
|
||
export declare function isRegex( | ||
regex: string, | ||
message?: string | ||
): (value?: string, ctx?: any) => boolean; | ||
): (value?: string, ctx?: unknown) => boolean; | ||
|
||
export declare function stringGt( | ||
valueC: number, | ||
message?: string | ||
): (value?: string, ctx?: unknown) => boolean; | ||
|
||
export declare function stringLt( | ||
valueC: number, | ||
message?: string | ||
): (value?: string, ctx?: unknown) => boolean; | ||
|
||
export declare function stringEq( | ||
valueC: number, | ||
message?: string | ||
): (value?: string, ctx?: unknown) => boolean; |