Skip to content

Commit

Permalink
fix: exclude internal /_*, /api/_* routes from NitroFetchReqeust …
Browse files Browse the repository at this point in the history
…type (#232)
  • Loading branch information
didavid61202 authored May 13, 2022
1 parent b153cea commit 00aa131
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/types/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { FetchRequest, FetchOptions, FetchResponse } from 'ohmyfetch'
// An interface to extend in a local project
export interface InternalApi { }

export type NitroFetchRequest = keyof InternalApi | Exclude<FetchRequest, string> | string & {}
export type NitroFetchRequest = Exclude<keyof InternalApi, `/_${string}`|`/api/_${string}`> | Exclude<FetchRequest, string> | string & {}

export type ValueOf<C> = C extends Record<any, any> ? C[keyof C] : never

Expand Down

0 comments on commit 00aa131

Please sign in to comment.