Skip to content

PubSub class is reported as deprecated by TypeScript-based lint tooling #9834

Open

Description

@aymenbidasap

Description

When using @google-cloud/pubsub@6.3.2, the PubSub class is flagged as deprecated by lint rules that rely on TypeScript's deprecation diagnostics (specifically sonarjs/deprecation, rule S1874).

Every import and usage of PubSub produces a warning: 'PubSub' is deprecated.

We don't believe PubSub is actually intended to be deprecated — there's no replacement mentioned in the docs, and the class is used in all official examples. Is this a known issue?

Steps to Reproduce

  1. Create a TypeScript project with @google-cloud/pubsub@6.3.2
  2. Use PubSub: import { PubSub } from '@google-cloud/pubsub'
  3. Run ESLint with the sonarjs/deprecation rule enabled
  4. Every import and usage of PubSub is flagged as deprecated

Environment

  • @google-cloud/pubsub: 6.3.2
  • TypeScript: 5.9.3
  • ESLint rule: sonarjs/deprecation (S1874)
  • Node.js: 24.22.2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions