Skip to content

Commit

Permalink
Replace deprecated @typescript-eslint/ban-types
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed Nov 15, 2024
1 parent 222dcd3 commit cb0dff3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/internal/fetch/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const ifObject = <V>(v: V) => {
if (typeof v === 'object' && v != null && !Array.isArray(v)) {
const proto = Object.getPrototypeOf(v)
if (proto === null || proto === plainObjectProto) {
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
return v as V extends JsonScalar | JsonArray | Function | symbol
? never
: V extends Json
Expand Down
5 changes: 2 additions & 3 deletions packages/oauth/jwk/src/util.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { base64url } from 'multiformats/bases/base64'
import { RefinementCtx, ZodIssueCode } from 'zod'

// eslint-disable-next-line @typescript-eslint/ban-types
export type Simplify<T> = { [K in keyof T]: T[K] } & {}
export type Override<T, V> = Simplify<V & Omit<T, keyof V>>

Expand All @@ -13,7 +12,7 @@ export type RequiredKey<T, K extends string> = Simplify<
} & Omit<T, K>
>

// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
export type DeepReadonly<T> = T extends Function
? T
: T extends object
Expand All @@ -22,7 +21,7 @@ export type DeepReadonly<T> = T extends Function
? readonly DeepReadonly<U>[]
: T

// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
export type UnReadonly<T> = T extends Function
? T
: T extends object
Expand Down
1 change: 0 additions & 1 deletion packages/oauth/oauth-provider/src/lib/util/type.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line @typescript-eslint/ban-types
export type Simplify<T> = { [K in keyof T]: T[K] } & {}
export type Override<T, V> = Simplify<V & Omit<T, keyof V>>
export type Awaitable<T> = T | Promise<T>

0 comments on commit cb0dff3

Please sign in to comment.