UNPKG

msw

Version:

Seamless REST/GraphQL API mocking library for browser and Node.js.

9 lines (8 loc) 223 B
export function hasRefCounted<T extends object>( value: T, ): value is T & NodeJS.RefCounted { return ( typeof Reflect.get(value, 'ref') === 'function' && typeof Reflect.get(value, 'unref') === 'function' ) }