fix(ui): convert node stubs to plain JavaScript
Biome flagged TypeScript syntax in the .mjs stub module. Remove type annotations and prefix the unused run() store parameter with underscore to satisfy lint rules.
This commit is contained in:
1 parent
e870beb71c
commit
c9b363d60d
1 file changed
+10
-10
+10
-10
@@ -2,18 +2,18 @@
|
|||||||
// UI fixture bundle. These keep esbuild from failing on `node:*` imports
|
// UI fixture bundle. These keep esbuild from failing on `node:*` imports
|
||||||
// while providing shape-compatible exports so the bundle stays loadable.
|
// while providing shape-compatible exports so the bundle stays loadable.
|
||||||
|
|
||||||
export class AsyncLocalStorage<T = unknown> {
|
export class AsyncLocalStorage {
|
||||||
enterWith(): void {}
|
enterWith() {}
|
||||||
exit(): void {}
|
exit() {}
|
||||||
getStore(): T | undefined {
|
getStore() {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
run<U>(store: T, work: () => U): U {
|
run(_store, work) {
|
||||||
return work();
|
return work();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createHash(): { update(): { digest(): string } } {
|
export function createHash() {
|
||||||
return {
|
return {
|
||||||
update: () => ({
|
update: () => ({
|
||||||
digest: () => "",
|
digest: () => "",
|
||||||
@@ -21,16 +21,16 @@ export function createHash(): { update(): { digest(): string } } {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function randomUUID(): string {
|
export function randomUUID() {
|
||||||
return "00000000-0000-0000-0000-000000000000";
|
return "00000000-0000-0000-0000-000000000000";
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function readFile(): Promise<Buffer> {
|
export async function readFile() {
|
||||||
return Buffer.alloc(0);
|
return Buffer.alloc(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
export const path = {
|
export const path = {
|
||||||
join: (...parts: string[]): string => parts.join("/"),
|
join: (...parts) => parts.join("/"),
|
||||||
resolve: (...parts: string[]): string => parts.join("/"),
|
resolve: (...parts) => parts.join("/"),
|
||||||
sep: "/",
|
sep: "/",
|
||||||
};
|
};
|
||||||
Reference in new issue
Block a user