Skip to main content
isSet - node__util--types.d.ts - Node documentation
function isSet

Usage in Deno

```typescript import { isSet } from "node:node__util--types.d.ts"; ```
isSet<T>(object: T | { }): object is T extends ReadonlySet<any> ? (unknown extends T ? never : ReadonlySet<any>) : Set<unknown>
Returns `true` if the value is a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance. ```js util.types.isSet(new Set()); // Returns true ```

Type Parameters

T

Parameters

object: T | { }

Return Type

object is T extends ReadonlySet<any> ? (unknown extends T ? never : ReadonlySet<any>) : Set<unknown>