import { Type } from '@manta-style/core' ; import { throwUnableToFormat } from '../utils/errorReporting' ; export default class NeverKeyword extends Type { public deriveLiteral ( ) { return this ; } public validate ( value ) { throw new Error ( '`never` keyword does not support `validate` method.' ) ; } public format ( value ) { throwUnableToFormat ( { typeName : 'NeverKeyword' , inputValue : value , reason : 'Never type can never be formatted.' , } ) ; } }