88 typnameStaticLines ,
99 scanOverrideNames ,
1010 type EmitFn ,
11- type EmitConfig ,
1211 type TypeEntry ,
1312 type Nullability ,
1413 type ClassChrome ,
@@ -180,7 +179,6 @@ const pgChrome = (
180179) : ClassChrome => {
181180 const isGeneric = GENERIC_TYPES . has ( pgType . typname ) ;
182181 const extendsClass = EXTENDS_MAP [ pgType . typname ] ;
183- const needsGenericT = isGeneric ;
184182 const parentIsContainer = extendsClass !== undefined
185183 && [ ...GENERIC_TYPES ] . some ( ( n ) => nameTable . get ( n ) ?. className === extendsClass ) ;
186184
@@ -202,7 +200,7 @@ const pgChrome = (
202200 // Explicit `in out N` variance annotation skips TS's structural
203201 // variance inference across 77 mutually-referencing classes.
204202 let classDecl = `export class ${ pgType . className } ` ;
205- if ( needsGenericT ) {
203+ if ( isGeneric ) {
206204 classDecl += `<T extends types.Any<any>, in out N extends number>` ;
207205 } else {
208206 classDecl += `<in out N extends number>` ;
@@ -244,10 +242,6 @@ export const generate = async () => {
244242
245243 try {
246244 const { typeMap, pgFuncs } = await introspect ( db , Object . keys ( OPERATOR_ALIASES ) ) ;
247- // Facts instance — catalog-independent (typnames, not OIDs),
248- // generated on the fly. This is what the unified emitter consumes;
249- // sqlite's equivalent is its committed docs/*.json.
250- const facts = produceFacts ( typeMap , pgFuncs ) ;
251245 const types : TypeEntry [ ] = [ ...typeMap . values ( ) ] . map ( ( t ) => ( {
252246 typname : t . typname ,
253247 className : t . className ,
@@ -257,14 +251,16 @@ export const generate = async () => {
257251 } ) ) ;
258252 const nameTable = new Map ( types . map ( ( t ) => [ t . typname , t ] ) ) ;
259253 const overrideNames = scanOverrides ( ) ;
260- const cfg : EmitConfig = { typeTable : nameTable , noMethod : new Set ( ) } ;
261254
262255 writeGeneratedTree ( {
263256 generatedDir : GENERATED_DIR ,
264257 barrelPath : TYPES_INDEX ,
265258 types,
266- facts,
267- cfg,
259+ // Facts instance — catalog-independent (typnames, not OIDs),
260+ // generated on the fly. This is what the unified emitter
261+ // consumes; sqlite's equivalent is its committed docs/*.json.
262+ facts : produceFacts ( typeMap , pgFuncs ) ,
263+ cfg : { typeTable : nameTable , noMethod : new Set ( ) } ,
268264 chromeFor : ( host ) => pgChrome ( host , nameTable , overrideNames ) ,
269265 overrides : overrideNames ,
270266 } ) ;
0 commit comments