1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
export type Exemption = {
readonly path: string;
readonly rule: string;
readonly count: number;
readonly reason: string;
};
export const ALLOWLIST: ReadonlyArray<Exemption> = [
{
path: "src/util/sharp-shim.ts",
rule: "inline-object-cast",
count: 1,
reason:
"sharp is an optional dependency resolved by a dynamic import, so its shape is unknown at compile time; the cast only claims an optional .default and every value read off it is re-checked with typeof before use",
},
{
path: "src/util/sharp-shim.ts",
rule: "named-cast",
count: 1,
reason:
"the same optional-dependency boundary: candidate is narrowed to a callable by a typeof check on the line above before it is claimed to be a SharpFactory",
},
{
path: "src/cdp/commands.ts",
rule: "named-cast",
count: 1,
reason:
"the sanctioned CDP result decoder; guarded by the validate.Check on the preceding line, and unavoidable because a generic key cannot correlate with its mapped value type",
},
{
path: "src/cdp/events.ts",
rule: "named-cast",
count: 1,
reason:
"the sanctioned CDP event decoder; same guarded Check and same generic-correlation limit as cdp/commands.ts",
},
{
path: "src/util/tool.ts",
rule: "function-cast",
count: 1,
reason:
"renderCall is stored under a per-tool Static<S> but invoked through the erased TSchema form; the generic-correlation limit makes this unavoidable and the value is the tool's own handler, created with the same S",
},
{
path: "src/domains/js.ts",
rule: "trailing-cast",
count: 1,
reason:
"the AsyncFunction constructor is reached through Object.getPrototypeOf, which returns any; the cast restores the constructor signature that a plain unknown would lose",
},
];
|