dist/LiteralTypes.js
// Union allows you to accept two kind of values
Union allows you to accept two kind of values
Union allows you to accept two kind of values
function combine(input1, input2, resultConversion 
) {
    var result;
    if (typeof input1 === 'number' && typeof input2 == 'number' || resultConversion === 'as-number') {
        result = +input1 + +input2;
    }
    else {
        result = input1.toString() + input2.toString();
    }
    return result;
}
function combine ( input1 , input2 , resultConversion ) { var result ; if ( typeof input1 === 'number' && typeof input2 == 'number' || resultConversion === 'as-number' ) { result = + input1 + + input2 ; } else { result = input1 . toString ( ) + input2 . toString ( ) ; } return result ; }
Union allows you to accept two kind of values
Union allows you to accept two kind of values
// UNION types combined with literal types