This repository was archived by the owner on Oct 9, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +19
-9
lines changed Expand file tree Collapse file tree 2 files changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -78,15 +78,9 @@ type ProcessFieldNodeWithoutSchema<Node extends Ast.FieldNode> = IsNonEmptyArray
7878 Node [ 'children' ]
7979> extends true
8080 ? {
81- [ K in Node [ 'name' ] ] : Node [ 'children' ] extends Ast . StarNode [ ]
82- ? any [ ]
83- : Node [ 'children' ] extends Ast . FieldNode [ ]
84- ? {
85- [ P in Node [ 'children' ] [ number ] as GetFieldNodeResultName < P > ] : P [ 'castType' ] extends PostgreSQLTypes
86- ? TypeScriptTypes < P [ 'castType' ] >
87- : any
88- } [ ]
89- : any [ ]
81+ [ K in GetFieldNodeResultName < Node > ] : Node [ 'children' ] extends Ast . Node [ ]
82+ ? ProcessNodesWithoutSchema < Node [ 'children' ] > [ ]
83+ : ProcessSimpleFieldWithoutSchema < Node >
9084 }
9185 : ProcessSimpleFieldWithoutSchema < Node >
9286
Original file line number Diff line number Diff line change @@ -35,6 +35,22 @@ const REST_URL = 'http://localhost:3000'
3535 }
3636 expectType < TypeEqual < typeof result , typeof expected > > ( true )
3737}
38+ // embeding renaming
39+ {
40+ const postgrest = new PostgrestClient ( REST_URL )
41+ const { data } = await postgrest
42+ . from ( 'projects' )
43+ . select ( 'status,service:services(service_api_keys(*))' )
44+ . single ( )
45+ let result : Exclude < typeof data , null >
46+ let expected : {
47+ status : any
48+ service : {
49+ service_api_keys : any [ ]
50+ } [ ]
51+ }
52+ expectType < TypeEqual < typeof result , typeof expected > > ( true )
53+ }
3854// spread operator with stars should return any
3955{
4056 const postgrest = new PostgrestClient ( REST_URL )
You can’t perform that action at this time.
0 commit comments