Skip to content

Commit c7bdf34

Browse files
committed
chore: fix test
1 parent 360d4aa commit c7bdf34

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/index.test-d.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { TypeEqual } from 'ts-expect'
22
import { expectError, expectType } from 'tsd'
33
import { PostgrestClient, PostgrestError } from '../src/index'
44
import { Prettify } from '../src/types'
5-
import { Json } from './types.generated'
5+
import { Json } from '../src/select-query-parser/types'
66
import { Database } from './types.override'
77

88
const REST_URL = 'http://localhost:3000'
@@ -190,9 +190,7 @@ const postgrest = new PostgrestClient<Database>(REST_URL)
190190
if (result.error) {
191191
throw new Error(result.error.message)
192192
}
193-
// getting this w/o the cast, not sure why:
194-
// Parameter type Json is declared too wide for argument type Json
195-
expectType<typeof result.data.bar extends Json ? true : false>(true)
193+
expectType<Json>(result.data.bar)
196194
expectType<string>(result.data.baz)
197195
}
198196

0 commit comments

Comments
 (0)