import { Type } from '@manta-style/core' ; export class ErrorType extends Type { private readonly message : string ; constructor ( errorMessage ) { super ( ) ; this . message = errorMessage ; } public deriveLiteral ( ) { return this ; } public validate ( value ) { throw Error ( 'ErrorType does not support `validate` method.' ) ; } public format ( vaue ) { throw Error ( 'ErrorType does not support `format` method.' ) ; } public mock ( ) { throw new Error ( this . message ) ; } }