import { SecretOption } from './secret-option' ; export class BoardSecret { readonly entityId : number ; readonly cardId : string ; readonly allPossibleOptions : readonly SecretOption [ ] ; public static create ( entityId , cardId , options ) { return Object . assign ( new BoardSecret ( ) , { entityId : entityId , cardId : cardId , allPossibleOptions : ( options ?? [ ] ) . map ( ( option ) => SecretOption . create ( option ) ) as readonly SecretOption [ ] , } as BoardSecret ) ; } public update ( value ) { return Object . assign ( new BoardSecret ( ) , this , value ) ; } }