Time:03-18
Why does the following typescript not compile without errors?
const conditionalTypedFunction = (inputArg: string | string []): typeof inputArg extends string ? string : string[] => { return inputArg; }
Here is a link to the TypeScript Playground:
Page link:https//www.codepudding.com/Enterprise/339702.html