UNPKG

@serenity-js/core

Version:

The core Serenity/JS framework, providing the Screenplay Pattern interfaces, as well as the test reporting and integration infrastructure

13 lines (10 loc) 303 B
import { ensure, isDefined, TinyType } from 'tiny-types'; export class Name extends TinyType { static fromJSON(v: string): Name { return new Name(v); } constructor(public readonly value: string) { super(); ensure(this.constructor.name, value, isDefined()); } }