Skip to content

Commit

Permalink
types(useDirectusRest): set unset DirectusSchema type to any #84
Browse files Browse the repository at this point in the history
  • Loading branch information
becem-gharbi committed May 9, 2024
1 parent 4635cda commit 431d189
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/composables/useDirectusRest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { RestCommand } from '@directus/sdk'
import { useNuxtApp } from '#imports'

export async function useDirectusRest<Output extends object> (
options: RestCommand<Output, DirectusSchema>
options: RestCommand<Output, keyof DirectusSchema extends never ? any : DirectusSchema>
): Promise<Output> {
return await useNuxtApp().$directus.client.request<Output>(options)
}

0 comments on commit 431d189

Please sign in to comment.