DefinitelyTyped / DefinitelyTyped/DefinitelyTyped
[@types/pg] functions `escapeLiteral` and `escapeIdentifier` missing from base `"pg"` module
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 51.4k
- Forks
- 30.4k
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 108
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
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.
Assessment
- Tech stack
- postgresql, typescript
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100