Skip to content

Commit

Permalink
remove uneeded any
Browse files Browse the repository at this point in the history
  • Loading branch information
talentlessguy committed Jan 4, 2024
1 parent 6eae95f commit 8d9874d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type Expect = {
expectStatus: (a: number, b?: string) => Expect
expectHeader: (a: string, b: string | RegExp | null | string[]) => Expect
expectBody: (a: unknown) => void
expect: (a: unknown, b?: any) => Expect
expect: (a: unknown, b?: unknown) => Expect
}

type MakeFetchResponse = { port: number } & Response & Expect
Expand Down Expand Up @@ -157,6 +157,7 @@ export const makeFetch = (h: HandlerOrListener) => {
assertEquals(data, a, `Expected to have body ${a}, got ${data}`)
}

// deno-lint-ignore no-explicit-any
const expectAll = (a: unknown, b?: any) => {
if (typeof a === 'number') {
expectStatus(a, b)
Expand Down
2 changes: 1 addition & 1 deletion mod_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class PseudoListener {
rid = 0
ref = () => {}
unref = () => {};
[Symbol.asyncIterator]: any
[Symbol.asyncIterator]: unknown
conn: Deno.Conn | undefined

constructor(port: number) {
Expand Down

0 comments on commit 8d9874d

Please sign in to comment.