Skip to content

Conversation

@lforst
Copy link
Contributor

@lforst lforst commented Apr 27, 2022

Add an overload to resolvedSyncPromise so we can call it without arguments and without having to do resolvedSyncPromise<void>(undefined).

This is inspired by typescripts way of defining Promise.resolve():
https://github.com/microsoft/TypeScript/blob/2a78b225d00170044becdbfe499909e7d6cad68b/lib/lib.es2015.promise.d.ts#L136-L147

Ref: https://getsentry.atlassian.net/browse/WEB-775

@lforst lforst added this to the 7.0.0 milestone Apr 27, 2022
@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 18.35 KB (-8.87% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 57.52 KB (-10.98% 🔽)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 17.13 KB (-9.18% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 51.75 KB (-10.73% 🔽)
@sentry/browser - Webpack (gzipped + minified) 20.94 KB (-9.88% 🔽)
@sentry/browser - Webpack (minified) 72.5 KB (-11.28% 🔽)
@sentry/react - Webpack (gzipped + minified) 20.98 KB (-9.89% 🔽)
@sentry/nextjs Client - Webpack (gzipped + minified) 45.97 KB (-4.34% 🔽)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 24.13 KB (-7.45% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 22.64 KB (-7.52% 🔽)

@lforst lforst changed the title ref(syncpromise): Add argument-less overload to resolvedSyncPromise ref: Add argument-less overload to resolvedSyncPromise Apr 27, 2022
@lforst lforst merged commit 7856952 into 7.x Apr 27, 2022
@lforst lforst deleted the lforst-sync-promise-overload branch April 27, 2022 19:11
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

Successfully merging this pull request may close these issues.

3 participants