TypeTags .WeakSet

Overview

The WeakSet object lets you store weakly held objects in a collection.

Usage

import { TypeTags } from 'typetags'
let mySet = new WeakSet()
let foo = {}
let bar = {}
mySet.add(foo)
mySet.add(bar)
TypeTags.get(mySet) === TypeTags.WeakSet
// → true
TypeTags.get(foo) === TypeTags.WeakSet
// → false
console.log(TypeTags.WeakSet)
// → [object WeakSet]

Metadata (TType)

MetadataValue
.typeWeakSet
.tag[object WeakSet]
.builtin()undefined
.getTag()[object WeakSet]
.hasSpecialArgs()false
.instance()undefined
.instanceTypeOf()object
.info()see more
.isAvailable()true
.isConstructor()true
.isFactory()false
.isFunction()true
.isGlobal()true
.isIterator()false
.isNested()false
.isObject()false
.isPrimitive()false
.isStringifiable()true
.isSyntatic()false
.isTypedArray()false
.ownKeys()[length, name, prototype]
.toString()function toString() { [native code] }
.typeOf()function

Signature

declare type ITypeTags = {
[key in Types | NestedTypes]: Tags
}
declare interface Predicate {
predicate(value: any): boolean
}

See MDN Web Docs