giteabot backport / giteabot (push) Canceled after 0s
giteabot / giteabot (push) Canceled after 0s
release-nightly / nightly-binary (push) Canceled after 0s
release-nightly / nightly-container (push) Canceled after 0s
cache-seeder / gobuild (push) Canceled after 0s
cache-seeder / lint (bindata, lint-backend) (push) Canceled after 0s
release-nightly-snapcraft / build-and-publish (push) Canceled after 0s
Includes direct password setup links in registration emails. Assisted-by: Codex:GPT-5
16 lines
280 B
TypeScript
16 lines
280 B
TypeScript
export function weakRefClass() {
|
|
const weakMap = new WeakMap();
|
|
return class {
|
|
constructor(target: any) {
|
|
weakMap.set(this, target);
|
|
}
|
|
deref() {
|
|
return weakMap.get(this);
|
|
}
|
|
};
|
|
}
|
|
|
|
if (!window.WeakRef) {
|
|
window.WeakRef = weakRefClass() as any;
|
|
}
|