File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { DateTime } from 'luxon';
5
5
import { keys as keysOf } from 'ts-transformer-keys' ;
6
6
import { inspect } from 'util' ;
7
7
import type { ResourceDBMap , ResourceMap } from '~/core' ;
8
- import { $ } from '~/core/edgedb/reexports' ;
8
+ import { $ , e } from '~/core/edgedb/reexports' ;
9
9
import { ScopedRole } from '../components/authorization' ;
10
10
import { CalculatedSymbol } from './calculated.decorator' ;
11
11
import { DataObject } from './data-object' ;
@@ -297,7 +297,9 @@ export type ResourceName<TResourceStatic extends ResourceShape<any>> =
297
297
string ;
298
298
299
299
export type DBType < TResourceStatic extends ResourceShape < any > > =
300
- ResourceName < TResourceStatic > extends keyof ResourceDBMap
300
+ ResourceShape < any > extends TResourceStatic
301
+ ? typeof e . Resource // short-circuit non-specific types
302
+ : ResourceName < TResourceStatic > extends keyof ResourceDBMap
301
303
? ResourceDBMap [ ResourceName < TResourceStatic > ] extends infer T extends $ . $expr_PathNode
302
304
? T
303
305
: never
You can’t perform that action at this time.
0 commit comments