dist/es2015/index.js
function mapCoerceFunction(type, strType, coerceFunction) {
    coerceFunction = coerceFunction || type.coerce;
    if (typeof strType !== 'string' || typeof coerceFunction !== 'function') {
        getLogger('map-coerce-function')
            .warn(`Bad attempt at mapping coerce function for type: ${type.name} to: ${strType}`);
        return;
    }
    coerceFunctions[strType] = coerceFunction;
    coerceFunctionMap.set(type, strType);
}
function mapCoerceFunction(type, strType, coerceFunction) {
    coerceFunction = coerceFunction || type.coerce;
    if (typeof strType !== 'string' || typeof coerceFunction !== 'function') {
        getLogger('map-coerce-function')
            .warn(`Bad attempt at mapping coerce function for type: ${type.name} to: ${strType}`);
        return;
    }
    coerceFunctions[strType] = coerceFunction;
    coerceFunctionMap.set(type, strType);
}
function mapCoerceFunction ( type , strType , coerceFunction ) { coerceFunction = coerceFunction || type . coerce ; if ( typeof strType !== 'string' || typeof coerceFunction !== 'function' ) { getLogger ( 'map-coerce-function' ) . warn ( ` ${ type . name } ${ strType } ` ) ; return ; } coerceFunctions [ strType ] = coerceFunction ; coerceFunctionMap . set ( type , strType ) ; }
Map a class to a string for typescript property coerce
@param type the property class to register
@param strType the string that represents class in the lookup
@param coerceFunction coerce function to register with param strType
Map a class to a string for typescript property coerce