UNPKG

@thisisagile/easy

Version:

Straightforward library for building domain-driven microservice architectures

9 lines (6 loc) 245 B
import { isA } from './IsA'; import { TypeGuard } from './TypeGuard'; export interface Validatable { isValid: boolean; } export const isValidatable: TypeGuard<Validatable> = (v?: unknown): v is Validatable => isA<Validatable>(v, 'isValid');