Skip to content

Commit 6d55115

Browse files
v1rtlclaude
andcommitted
Add explicit return types for JSR slow types check
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e05615e commit 6d55115

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mod.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function alladdrs(
3434
req: RequestWithConnection,
3535
trust?: Trust,
3636
info?: ConnectionInfo,
37-
) {
37+
): string[] {
3838
// get addresses
3939

4040
const addrs = forwarded(req, info)
@@ -54,7 +54,7 @@ function alladdrs(
5454
*
5555
* @param val
5656
*/
57-
function compile(val: string | string[]) {
57+
function compile(val: string | string[]): (addr: string, i?: number) => boolean {
5858
let trust
5959
if (typeof val === 'string') trust = [val]
6060
else if (Array.isArray(val)) trust = val.slice()
@@ -90,7 +90,7 @@ function normalizeSubnets(arr: string[]) {
9090
*
9191
* @param note IP notation (e.g. "127.0.0.1", "10.0.0.0/8", "192.168.0.0/255.255.0.0")
9292
*/
93-
export function normalizeCIDR(note: string) {
93+
export function normalizeCIDR(note: string): string {
9494
const pos = note.lastIndexOf('/')
9595
const str = pos !== -1 ? note.substring(0, pos) : note
9696

@@ -207,7 +207,7 @@ export function proxyaddr(
207207
req: RequestWithConnection,
208208
trust?: Trust,
209209
info?: ConnectionInfo,
210-
) {
210+
): string {
211211
const addrs = alladdrs(req, trust, info)
212212

213213
return addrs[addrs.length - 1]

0 commit comments

Comments
 (0)