Polyfill WeakRef (#34025) (#34028)

Backport #34025 by wxiaoguang

Fix #33407

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Giteabot
2025-03-27 00:13:22 +08:00
committed by GitHub
parent 4b3400bd9c
commit 35983ac0a8
2 changed files with 23 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
import {weakRefClass} from './polyfills.ts';
test('polyfillWeakRef', () => {
const WeakRef = weakRefClass();
const r = new WeakRef(123);
expect(r.deref()).toEqual(123);
});