Skip to content

Build failure on a project running on TS 4.7.4 #3699

Description

@ilyakivilev

This project have seen successful builds until recently. Looks like pg-protocol switched to TS ^6 starting v1.15 which is a breaking change for those running on older versions.

Build log is below.

node_modules/pg-protocol/dist/serializer.d.ts:34:18 - error TS2315: Type 'Buffer' is not generic.
34     flush: () => Buffer<ArrayBufferLike>;
                    ~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pg-protocol/dist/serializer.d.ts:35:17 - error TS2315: Type 'Buffer' is not generic.
35     sync: () => Buffer<ArrayBufferLike>;
                   ~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pg-protocol/dist/serializer.d.ts:36:16 - error TS2315: Type 'Buffer' is not generic.
36     end: () => Buffer<ArrayBufferLike>;
                  ~~~~~~~~~~~~~~~~~~~~~~~
node_modules/pg-protocol/dist/serializer.d.ts:38:21 - error TS2315: Type 'Buffer' is not generic.
38     copyDone: () => Buffer<ArrayBufferLike>;
                       ~~~~~~~~~~~~~~~~~~~~~~~

Options to resolve I found:

  1. Pin pg-protocol to v1.14 via overrides which is not ideal
  2. Switch my project to TS ^6 potentially bringing other compatibility issues

Is this possible to keep pg-protocol on the older TS version?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions