You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Class 'SyncPromise<T>' incorrectly implements interface 'Promise<T>'. for @sentry/browser@5.7.0 #2265
Provide a link to the affected event from your Sentry account - no event available, typescript app failed to build with latest sentry
Package + Version
@sentry/browser - 5.7.0
Version:
5.7.0
Description
Our typescript app failed the build when compiled with the latest sentry/browser (5.7.0)
ERROR in node_modules/@sentry/utils/dist/syncpromise.d.ts(5,22):
error TS2420: Class 'SyncPromise<T>' incorrectly implements interface 'Promise<T>'.
Types of property '[Symbol.toStringTag]' are incompatible.
Type 'string' is not assignable to type '"Promise"'.
I noticed that this only happened when we picked up the latest release, let me know if you need other information to reproduce. We're using typescript version 2.4.2
I did some research, and apparently this was an issue with TypeScript prior to version 3.2, which has been patched since then: microsoft/TypeScript#24396
I'm not sure how to approach this yet. As on the one hand interface requires this to be there, but if we'll use Promise as old TypeScript versions requires us to, it'd be impossible to make a distinction between our and native implelmentation using symbols.
+1 we are having exact the same problem, upgrading TypeScript to version 3 is currently not possible. We had to go back to version 5.6.* of sentry/browser.
Activity
kamilogorek commentedon Oct 11, 2019
I did some research, and apparently this was an issue with TypeScript prior to version 3.2, which has been patched since then: microsoft/TypeScript#24396
I'm not sure how to approach this yet. As on the one hand interface requires this to be there, but if we'll use
Promiseas old TypeScript versions requires us to, it'd be impossible to make a distinction between our and native implelmentation using symbols.tolzhabayev commentedon Oct 13, 2019
+1 we are having exact the same problem, upgrading TypeScript to version 3 is currently not possible. We had to go back to version 5.6.* of sentry/browser.
kamilogorek commentedon Oct 15, 2019
Fixed in
5.7.1kamilogorek commentedon Oct 15, 2019
@tolzhabayev including TS2 :)
tolzhabayev commentedon Oct 27, 2019
thank you!! :)