Skip to content

TS Language server gets extremely slow whenever telegraf is imported #2057

@val-o

Description

@val-o

Context

I noticed that any of vscode based IDEs gets extremely slow in Typescript Intellisense in any project where telegraf is used. I manually excluded telegraf types in tsconfig and the issue resolved. So the root cause might be in sophisticated telegraf typings. Maybe they can be simplified without loosing type safety?

  • Telegraf.js Version: 4.16.3
  • Node.js Version: 22
  • Operating System: Sonoma 14.2

Minimal Example Code Reproducing the Issue

import {} from 'telegraf'
// your code here. Please omit everything not related to the issue,
// to make it easier to pinpoint the cause.
// Please try running this code to make sure it actually reproduces the issue.

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