mattpocock / mattpocock/ts-error-translator

Translation request for 2790

Open
#335 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.5k
Forks
92
PR merge metrics
No merged PRs in 30d

Description

Error Text

The operand of a 'delete' operator must be optional.

Supporting Information

Please provide other information which led to this error, and any specific questions you have about it:
I am following sequalize suggestion for using the lib with lambda Here

export const getSequelize = async () => {
  if (!sequelize) {
    sequelize = await loadSequelize()
  } else {
    // restart connection pool to ensure connections are not re-used across invocations
    sequelize.connectionManager.initPools()

    // restore `getConnection()` if it has been overwritten by `close()`
    if (sequelize.connectionManager.hasOwnProperty('getConnection')) {
      delete sequelize.connectionManager.getConnection // Error: The operand of a 'delete' operator must be optional.
    }
  }

  return sequelize
}

Contributor guide

Open the 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.

Research direction

Start by locating how TypeScript diagnostic translations are represented and find the entry associated with diagnostic 2790. Compare the existing wording with the reported error, then add the plain-English translation and verify that the extension displays it correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.