Skip to content

Conversation

@mattcosta7
Copy link
Member

@mattcosta7 mattcosta7 commented Oct 17, 2024

@mattcosta7 mattcosta7 self-assigned this Oct 17, 2024
@mattcosta7 mattcosta7 marked this pull request as ready for review October 17, 2024 13:11
@mattcosta7 mattcosta7 requested a review from a team as a code owner October 17, 2024 13:11
@mattcosta7 mattcosta7 requested a review from dgreif October 17, 2024 13:11
// eslint-disable-next-line @typescript-eslint/no-explicit-any
reject: (reason?: any) => void
}
out.promise = new Promise<T>((resolve, reject) => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit - I would new this here, but we call this in tests directly, so haven't done so


export function apply(): void {
if (!('withResolvers' in Promise)) {
Object.assign(Promise, {withResolvers})
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using Object.assign to avoid type errors from defining withResolvers on Promise

@dgreif dgreif enabled auto-merge October 17, 2024 13:13
@dgreif dgreif merged commit ed36174 into main Oct 17, 2024
5 checks passed
@dgreif dgreif deleted the polyfill-with-resolvers branch October 17, 2024 13:22
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