jiangshan
jiangshan
作者这个TODO写的不错啊。
在等这篇文章出来的时间我已经把vue的实现看过了。。。。
https://github.com/andnp/SimplyTyped/blob/master/src/types/utils.ts#L41 https://github.com/piotrwitek/utility-types/blob/master/src/mapped-types.ts#L537 https://github.com/Microsoft/TypeScript/issues/202
@antfu I just find that there is something wrong with the GitHub Actions. There should be an auto-generated PR related to this issue. There are many [issues](https://github.com/type-challenges/type-challenges/issues?q=is%3Aopen+is%3Aissue+label%3Anew-challenge) with the same...
```typescript type AnyMeasurementUnit = { [K in keyof T]:T[K] extends readonly any[]?T[K][number]:never }[keyof T] ``` @koodiohto Your description is too specific. It's better to have a broader description
@koodiohto Yesterday I edited your test case from ```Expect,``` to ```Expect,```. At first I thought it was just a typo. After you replied me , I finally realize that what...
@Big-Bear3 Do you mean the built-in ```ConstructorParameters``` type ?
我一直认为underscore作为一个工具库,支持面向对象风格很奇怪。不知道博主怎么看这件事。
@flexWhale Tuple is a kind of Array with fixed length.
@z-juln ```T extends readonly any[]```为什么不放在泛型约束里? 因为我其实希望允许这么使用 ```type A = IsTuple // false ``` , 你的实现会直接报错 readonly是因为要考虑 readonly的array和tuple