Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[@types/pg] functions `escapeLiteral` and `escapeIdentifier` missing from base `"pg"` module

Open Beginner friendly
#68,050 2 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
postgresql, typescript
Domain
databases

Research direction

Start in types/pg/index.d.ts around the ClientBase declarations and compare the module's exports with the pg utility-functions documentation and referenced client.js source. Done means TypeScript consumers can import escapeLiteral and escapeIdentifier directly from the base pg module with matching declarations.

Written by the indexing model from the issue text.

Description

@types/pg has type detentions for escapeLiteral and escapeIdentifier on the ClientBase object, but not exported from the base pg module.

The pg docs recommend importing these functions directly from pg. Additionally, the pg source code states:

  // escapeIdentifier and escapeLiteral moved to utility functions & exported
  // on PG
  // re-exported here for backwards compatibility
Dominant language
TypeScript
Stars
51.4k
Forks
30.4k
Avg merge
3d 1h
Merged PRs (30d)
94

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DefinitelyTyped/DefinitelyTyped

All issues in DefinitelyTyped/DefinitelyTyped

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.