Answers for "typescript array different type"

0

Array<Type> VS Type

function loggingIdentity<T>(arg: T[]): T[] {
    console.log(arg.length);
    return arg;
}
// or 
function loggingIdentity<T>(arg: Array<T>): Array<T> {
    console.log(arg.length);
    return arg;
}
Posted by: Guest on January-01-1970

Code answers related to "TypeScript"

Browse Popular Code Answers by Language