cxc-szcx-uniapp/uni_modules/lime-shared/isFunction/index.ts

17 lines
420 B
TypeScript
Raw Normal View History

2025-03-06 18:35:00 +00:00
// @ts-nocheck
/**
*
* @param val
* @returns true false
*/
// #ifdef UNI-APP-X && APP
export const isFunction = (val: any):boolean => typeof val == 'function';
// #endif
// #ifndef UNI-APP-X && APP
export const isFunction = (val: unknown): val is Function =>
typeof val === 'function';
// #endif