Alexandro.Net

PostgreSQL TypeScript declarations / MIT

@stackline/types-pg

The exact @types/[email protected] declaration surface with a reviewed parser and Node type dependency chain.

npm install @stackline/types-pg

Preserve automatic discovery with npm install @types/pg@npm:@stackline/types-pg.

Release
1.0.0
Compiler
TypeScript 5.6+
Runtime
Node 16+
Baseline
@types/pg 8.23.1
Declaration diff
None

01 / Install

Keep TypeScript discovery unchanged.

npm install \
  pg@npm:@stackline/pg \
  @types/pg@npm:@stackline/types-pg

Existing import { Pool } from 'pg' statements and deep declaration imports continue to resolve through their historical package keys.

02 / Declaration contract

Types stay byte-for-byte aligned with the baseline.

Public API. Client, pool, query, configuration, result-row, notification, and event declarations are unchanged from @types/[email protected].

Module systems. CJS and ESM declaration entry points are included, along with supported pg/lib/* paths.

Compiler line. The package preserves the baseline TypeScript 5.6 minimum instead of silently raising it.

03 / Production closure

Declaration dependencies receive the same scrutiny as runtime code.

04 / Migration

Use the historical type slot for a drop-in replacement.

Automatic discovery

"@types/pg": "npm:@stackline/[email protected]"

Keep existing imports and compiler discovery.

Explicit scoped types

import type { PoolConfig } from '@stackline/types-pg'

Use the scoped declaration package directly when changing imports is acceptable.

05 / Reference

Read the maintained contract.