Blame view

天文台pc/tianwentai-ui/node_modules/react-dnd/src/internals/isRef.ts 257 Bytes
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
  export interface Ref<T> {
  	current: T
  }
  
  export function isRef(obj: unknown): boolean {
  	return (
  		// eslint-disable-next-line no-prototype-builtins
  		obj !== null &&
  		typeof obj === 'object' &&
  		Object.prototype.hasOwnProperty.call(obj, 'current')
  	)
  }