codon

Results 5 comments of codon

昨天下载了一个2.88g的文件后,今天也出现了你这样的情况

`function copyFields(target: T, source: U): T { for (let id in source) { target[id] = (source)[id]; } return target; }` 请问这段代码的`(source)`是什么意思?这个写法没看明白

> @codon19 `source` 就是 `source as T`,把 `source` 断言成 `T` 类型 嗯好的,谢谢