UNPKG

@serenity-js/core

Version:

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

22 lines 793 B
import { ensure, isDefined } from 'tiny-types'; import { CorrelationId, Description } from '../model/index.js'; import { Timestamp } from '../screenplay/index.js'; import { DomainEvent } from './DomainEvent.js'; /** * @group Events */ export class SceneTemplateDetected extends DomainEvent { sceneId; template; static fromJSON(o) { return new SceneTemplateDetected(CorrelationId.fromJSON(o.sceneId), Description.fromJSON(o.template), Timestamp.fromJSON(o.timestamp)); } constructor(sceneId, template, timestamp) { super(timestamp); this.sceneId = sceneId; this.template = template; ensure('sceneId', sceneId, isDefined()); ensure('template', template, isDefined()); } } //# sourceMappingURL=SceneTemplateDetected.js.map