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

src/sandbox/omitters/-this.ts   A

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 15
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 1
mnd 0
bc 0
fnc 1
bpm 0
cpm 1
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A -this.ts ➔ k 0 6 1
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
}