Skip to main content
isSet - util/types - Node documentation
function isSet

Usage in Deno

import { isSet } from "node:util/types";
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 instance.

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>
Back to top