__sandbox__/omitters/-this.ts   A
last analyzed

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 16
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

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

1 Function

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