import { Ident } from './Ident' ; /**
 * A set of Idents.
 */ export class IdentSet { private entries : { [ ident ] : boolean ; } ; params returns constructor ( idents ? ) { this . entries = { } ; if ( idents ) { idents . forEach ( ( ident ) => this . add ( ident ) ) ; } } returns size ( ) { return Object . keys ( this . entries ) . length ; } param ident add ( ident ) { this . entries [ ident . toString ( ) ] = true ; } param ident returns has ( ident ) { return ! ! this . entries [ ident . toString ( ) ] ; } param ident remove ( ident ) { delete this . entries [ ident . toString ( ) ] ; } returns toJSON ( ) { return Object . keys ( this . entries ) ; } }