import IField from './' ; class Boolean implements IField < string | boolean , boolean > { private _value : boolean = false ; public set ( value ) { if ( ! value ) { this . _value = false ; } else if ( 'boolean' === typeof value ) { this . _value = value ; } else { this . _value = /^\s*(true|1(.(0)+)?)\s*$/i . test ( value || '' ) ; } } public get ( ) { return this . _value ; } } export default Boolean ;