Total Complexity | 1 |
Complexity/F | 1 |
Lines of Code | 16 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { ClassHash } from "../../src/main.types"; |
||
2 | |||
3 | const source = {a: "a", b: undefined} |
||
4 | , called = k.call(source) |
||
5 | //... @ts-expect-error |
||
6 | , key: typeof called[number] = "z" |
||
7 | |||
8 | export {key} |
||
9 | |||
10 | function k<K extends string, T extends Record<K, ClassHash>>( |
||
11 | this: T |
||
12 | // or `K` - whatever |
||
13 | ): (keyof T)[] { |
||
14 | //@ts-expect-error |
||
15 | return Object.keys(this) |
||
16 | } |