Skip to content

Commit 386d3d2

Browse files
lint
1 parent de6fbd2 commit 386d3d2

5 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/build_cache.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export class ProdBuildCache<State> implements BuildCache<State> {
7171
}
7272

7373
export class IslandPreparer {
74-
namer = new UniqueNamer();
74+
#namer = new UniqueNamer();
7575

7676
prepare(
7777
registry: ServerIslandRegistry,
@@ -83,7 +83,7 @@ export class IslandPreparer {
8383
if (typeof value !== "function") continue;
8484

8585
const islandName = name === "default" ? modName : name;
86-
const uniqueName = this.namer.getUniqueName(islandName);
86+
const uniqueName = this.#namer.getUniqueName(islandName);
8787

8888
const fn = value as AnyComponent;
8989
registry.set(fn, {

src/context.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,6 @@ export class Context<State> {
273273
vnode ?? h(Fragment, null),
274274
this,
275275
state,
276-
this.#buildCache,
277276
headers,
278277
);
279278
} catch (err) {

src/fs_routes.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ export function fsItemsToCommands<State>(
116116
{
117117
component: mod.default ?? undefined,
118118
config: mod.config ?? undefined,
119+
// deno-lint-ignore no-explicit-any
119120
handler: (handlers as any) ?? undefined,
120121
},
121122
true,
@@ -126,6 +127,7 @@ export function fsItemsToCommands<State>(
126127
commands.push(newNotFoundCmd({
127128
config: mod.config,
128129
component: mod.default,
130+
// deno-lint-ignore no-explicit-any
129131
handler: handlers as any ?? undefined,
130132
}));
131133
continue;
@@ -144,6 +146,7 @@ export function fsItemsToCommands<State>(
144146
...mod.config,
145147
routeOverride: mod.config?.routeOverride ?? routePattern,
146148
},
149+
// deno-lint-ignore no-explicit-any
147150
handler: (handlers as any) ?? undefined,
148151
component: mod.default,
149152
},

src/render.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
} from "./runtime/server/preact_hooks.tsx";
1313
import type { Context } from "./context.ts";
1414
import { recordSpanError, tracer } from "./otel.ts";
15-
import type { BuildCache } from "./build_cache.ts";
1615
import { DEV_ERROR_OVERLAY_URL } from "./constants.ts";
1716
import { renderToString } from "preact-render-to-string";
1817
import { BUILD_ID } from "./runtime/build_id.ts";
@@ -62,7 +61,6 @@ export function preactRender<State, Data>(
6261
vnode: VNode,
6362
ctx: PageProps<Data, State>,
6463
state: RenderState,
65-
buildCache: BuildCache,
6664
headers: Headers,
6765
) {
6866
try {

src/utils.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,21 @@ export function escapeScript(
4949
}
5050

5151
export class UniqueNamer {
52-
seen = new Map<string, number>();
52+
#seen = new Map<string, number>();
5353

5454
getUniqueName(name: string): string {
55-
const count = this.seen.get(name);
55+
const count = this.#seen.get(name);
5656
if (count === undefined) {
57-
this.seen.set(name, 1);
57+
this.#seen.set(name, 1);
5858
} else {
59-
this.seen.set(name, count + 1);
59+
this.#seen.set(name, count + 1);
6060
name = `${name}_${count}`;
6161
}
6262

6363
return name;
6464
}
6565

66-
getNames() {
67-
return this.seen.keys();
66+
getNames(): string[] {
67+
return Array.from(this.#seen.keys());
6868
}
6969
}

0 commit comments

Comments
 (0)