📅  最后修改于: 2022-03-11 14:48:28.181000             🧑  作者: Mango
代码示例1
function dependsOnParameter(x: B): B extends true ? number : string {
if (x) {
return 3 as any;
} else {
return "string"as any;
}
}