Passed
Push — main ( c4701f...95102b )
by Andrii
02:26
created

-this.ts ➔ k   A

Complexity

Conditions 1

Size

Total Lines 6
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
import { ClassValue } from "../../defs";
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, ClassValue>>(
11
  this: T
12
): (keyof T)[] {
13
  //@ts-expect-error
14
  return Object.keys(this)
15
}