Checks if the given value is Set object.

Syntax

TypeScript
import { isSet } from '@opentf/std';

isSet(value: unknown): val is Set<unknown>

Examples

TypeScript
isSet(new Set()) //=> true

isSet(new WeakSet()) //=> false

isSet({}) //=> false
Last updated on
Edit this page