mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
chore: fix failing typecheck
This commit is contained in:
1 parent
179402ef92
commit
d52154f686
2 files changed
+5
-5
No files matched your search
@@ -28,12 +28,12 @@ export interface PresetConfig {
|
||||
queries: Record<string, DbQuery | LogsQuery>
|
||||
}
|
||||
|
||||
interface DbQuery {
|
||||
export interface DbQuery {
|
||||
queryType: 'db'
|
||||
sql: (params: BaseReportParams) => string
|
||||
sql: string | ((params: BaseReportParams) => string)
|
||||
}
|
||||
|
||||
interface LogsQuery {
|
||||
export interface LogsQuery {
|
||||
queryType: 'logs'
|
||||
sql: string
|
||||
}
|
||||
|
||||
@@ -4,12 +4,12 @@ import {
|
||||
DbQueryData,
|
||||
DbQueryHandler,
|
||||
MetaQueryResponse,
|
||||
PresetSql,
|
||||
DbQuery,
|
||||
} from 'components/interfaces/Reports/Reports.types'
|
||||
import { useStore } from 'hooks'
|
||||
import useSWR from 'swr'
|
||||
|
||||
type UseDbQuery = (sql: PresetSql, params?: BaseReportParams) => [DbQueryData, DbQueryHandler]
|
||||
type UseDbQuery = (sql: DbQuery['sql'], params?: BaseReportParams) => [DbQueryData, DbQueryHandler]
|
||||
const useDbQuery: UseDbQuery = (sql, params = DEFAULT_QUERY_PARAMS) => {
|
||||
const { meta } = useStore()
|
||||
|
||||
|
||||
Reference in new issue
Block a user