import { Type } from '@manta-style/core' ; import { throwUnableToFormat } from '../utils/errorReporting' ; export default class NullKeyword extends Type { public deriveLiteral ( ) { return this ; } public mock ( ) { return null ; } public validate ( value ) { return value === null ; } public format ( value ) { if ( [ null , 0 , '' ] . includes ( value as null ) ) { return null ; } throwUnableToFormat ( { typeName : 'NullKeyword' , inputValue : value , expectedValue : [ null , 0 , '' ] , } ) ; } }