chore: improve utils typing (#6341)

This commit is contained in:
neverland 2020-05-22 17:18:15 +08:00 committed by GitHub
parent 75e4bace97
commit 1962194499
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ export const isServer: boolean = Vue.prototype.$isServer;
// eslint-disable-next-line @typescript-eslint/no-empty-function
export function noop() {}
export function isDef(val: any): boolean {
export function isDef(val: unknown): boolean {
return val !== undefined && val !== null;
}
@ -16,7 +16,7 @@ export function isFunction(val: unknown): val is Function {
return typeof val === 'function';
}
export function isObject(val: any): val is Record<any, any> {
export function isObject(val: unknown): val is Record<any, any> {
return val !== null && typeof val === 'object';
}