Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argument of type 'undefined' is not assignable to parameter of type 'string | symbol' #110

Open
taikishiino opened this issue Mar 22, 2023 · 0 comments

Comments

@taikishiino
Copy link

taikishiino commented Mar 22, 2023

Hi👋
After doing the nest build, I am getting the following error.
I think it is probably related to the fact that I have updated to TypeScript 5 series.
Is there any workaround for this?

src/common/sentry/sentry.service.ts:6:16 - error TS1239: Unable to resolve signature of parameter decorator when called as an expression.
  Argument of type 'undefined' is not assignable to parameter of type 'string | symbol'.

6   constructor(@InjectSentry() private readonly sentry: Sentry) {}
                 ~~~~~~~~~~~~~~

Verification Codes

import { Injectable } from '@nestjs/common'
import { InjectSentry, SentryService as Sentry } from '@ntegral/nestjs-sentry'

@Injectable()
export class SentryService {
  constructor(@InjectSentry() private readonly sentry: Sentry) {}

  sendException(exception: Error): void {
    this.sentry.instance().captureException(exception)
  }
}

environment

  • "@nestjs/common": "^9.3.11"
  • "@nestjs/core": "^9.3.11"
  • "typescript": "^5.0.2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant