-
```ts
// your answers
type DeepReadonly = { readonly [K in keyof T]: T[K] extends Function ? T[K] : DeepReadonly };
```
-
等等, 这题一大堆答案用 keyof T[P] extends never 去判断是不是 nested 到底是谁教的?
```ts
type TS = keyof 'hello' extends never? true: false
```
基本类型比如 string 的子类也是挂着一堆 properties 和methods, 所以上面判断为假,
所以这难道不意味着把基础类型的内…
-
Deep methods can not be put in a `make_da_pipeline` since the pipeline detects it like an estimator, which should not get access to target data.
-
```ts
// your answers
type DeepReadonly = {
readonly [P in keyof T]: keyof T[P] extends never ? T[P] : DeepReadonly
}
```
-
for instance:
`Bradley`,
is giving results for gradle and not the Bradley listed in PLC4X https://camel.apache.org/components/next/plc4x-component.html
`firmata` is listing things with a `forma…
-
**Describe the bug**
Not sure if a bug, but when I tried to use the `toFormikValidationSchema(Schema)`, I get a warning saying `Type instantiation is excessively deep and possibly infinite.`. This se…
-
```ts
// your answers
type Primitive = string | number | boolean | Function
type DeepReadonly = { readonly [K in keyof T]: T[K] extends Primitive ? T[K] : DeepReadonly }
```
-
```ts
type DeepReadonly = {
readonly [key in keyof T]: T[key] extends Function ? T[key]: T[key] extends object ? DeepReadonly : T[key];
}
```
-
```ts
type DeepReadonly = {
[key in keyof T]: T[key] extends Record ? DeepReadonly : T[key];
};
```
-
```ts
type DeepReadonly = T extends object & { call?(): never } ? { readonly [P in keyof T]: DeepReadonly } : T;
```
Zapix updated
2 years ago