Skip to content

Commit bc3f7ff

Browse files
committed
chore: fix src for updated eslint version
1 parent b5f9c47 commit bc3f7ff

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/strace.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ export function strace<T extends object>(
55
return new Proxy(imports, {
66
get(target, prop, receiver) {
77
const f = Reflect.get(target, prop, receiver);
8-
if (no_trace.includes(prop)) {
8+
if (no_trace.includes(prop) || typeof f !== "function") {
99
return f;
1010
}
11-
return function (...args: undefined[]) {
11+
return (...args: unknown[]) => {
1212
console.log(prop, "(", ...args, ")");
13-
// eslint-disable-next-line @typescript-eslint/ban-types
14-
const result = Reflect.apply(f as Function, receiver, args);
13+
const result = Reflect.apply(
14+
f as (...fnArgs: unknown[]) => unknown,
15+
receiver,
16+
args,
17+
);
1518
console.log(" =", result);
1619
return result;
1720
};

src/wasi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export default class WASI {
169169
let monotonic_time: bigint;
170170
try {
171171
monotonic_time = BigInt(Math.round(performance.now() * 1000000));
172-
} catch (e) {
172+
} catch {
173173
// performance.now() is only available in browsers.
174174
// TODO use the perf_hooks builtin module for NodeJS
175175
monotonic_time = 0n;

0 commit comments

Comments
 (0)