Skip to content

Conversation

@ExE-Boss
Copy link
Contributor

@ExE-Boss ExE-Boss commented Jan 10, 2021

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Jan 10, 2021
@typescript-bot
Copy link
Collaborator

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

@sandersn
Copy link
Member

There's a lot of discussion on that issue and the linked PR. Can you add an explanation of why the type parameter is important?

@ExE-Boss
Copy link
Contributor Author

Because it makes the heldValue that’s passed to the cleanupCallback correctly typed instead of using any.

@sandersn sandersn requested review from orta and sandersn January 16, 2021 00:46
@sandersn
Copy link
Member

Is typical usage going to allow the type parameter to be inferred? I think it is, but it would be nice to have a test.

@ExE-Boss
Copy link
Contributor Author

@sandersn I’ve added a test case based on IterableWeakMap from the TC39 WeakRef proposal with the fixes from tc39/proposal-weakrefs#216.

@ExE-Boss ExE-Boss force-pushed the lib/es2021/typed-finalization-registry branch from 3502962 to 9f8c895 Compare January 16, 2021 18:29
@ExE-Boss ExE-Boss force-pushed the lib/es2021/typed-finalization-registry branch from 9f8c895 to 4ac2a13 Compare February 7, 2021 15:42
@sandersn sandersn merged commit 0723904 into microsoft:master Feb 19, 2021
@ExE-Boss ExE-Boss deleted the lib/es2021/typed-finalization-registry branch February 19, 2021 01:32
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants