mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 03:09:39 -06:00
Correct the type of return value of FinalizationRegistry.unregister (#57948)
This commit is contained in:
parent
05f4dbab10
commit
e33b8d9b85
2
src/lib/es2021.weakref.d.ts
vendored
2
src/lib/es2021.weakref.d.ts
vendored
@ -42,7 +42,7 @@ interface FinalizationRegistry<T> {
|
||||
* @param unregisterToken The token that was used as the unregisterToken argument when calling
|
||||
* register to register the target value.
|
||||
*/
|
||||
unregister(unregisterToken: WeakKey): void;
|
||||
unregister(unregisterToken: WeakKey): boolean;
|
||||
}
|
||||
|
||||
interface FinalizationRegistryConstructor {
|
||||
|
||||
@ -168,14 +168,14 @@ f.register(s, null);
|
||||
> : ^^^^^^
|
||||
|
||||
f.unregister(s);
|
||||
>f.unregister(s) : void
|
||||
> : ^^^^
|
||||
>f.unregister : (unregisterToken: WeakKey) => void
|
||||
> : ^ ^^ ^^^^^^^^^
|
||||
>f.unregister(s) : boolean
|
||||
> : ^^^^^^^
|
||||
>f.unregister : (unregisterToken: WeakKey) => boolean
|
||||
> : ^ ^^ ^^^^^^^^^^^^
|
||||
>f : FinalizationRegistry<unknown>
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
>unregister : (unregisterToken: WeakKey) => void
|
||||
> : ^ ^^ ^^^^^^^^^
|
||||
>unregister : (unregisterToken: WeakKey) => boolean
|
||||
> : ^ ^^ ^^^^^^^^^^^^
|
||||
>s : symbol
|
||||
> : ^^^^^^
|
||||
|
||||
|
||||
@ -168,14 +168,14 @@ f.register(s, null);
|
||||
> : ^^^^^^
|
||||
|
||||
f.unregister(s);
|
||||
>f.unregister(s) : void
|
||||
> : ^^^^
|
||||
>f.unregister : (unregisterToken: WeakKey) => void
|
||||
> : ^ ^^ ^^^^^^^^^
|
||||
>f.unregister(s) : boolean
|
||||
> : ^^^^^^^
|
||||
>f.unregister : (unregisterToken: WeakKey) => boolean
|
||||
> : ^ ^^ ^^^^^^^^^^^^
|
||||
>f : FinalizationRegistry<unknown>
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
>unregister : (unregisterToken: WeakKey) => void
|
||||
> : ^ ^^ ^^^^^^^^^
|
||||
>unregister : (unregisterToken: WeakKey) => boolean
|
||||
> : ^ ^^ ^^^^^^^^^^^^
|
||||
>s : symbol
|
||||
> : ^^^^^^
|
||||
|
||||
|
||||
@ -357,16 +357,16 @@ export class IterableWeakMap<K extends object, V> implements WeakMap<K, V> {
|
||||
> : ^^^^^^^^^^
|
||||
|
||||
this.#finalizationGroup.unregister(ref);
|
||||
>this.#finalizationGroup.unregister(ref) : void
|
||||
> : ^^^^
|
||||
>this.#finalizationGroup.unregister : (unregisterToken: WeakKey) => void
|
||||
> : ^ ^^ ^^^^^^^^^
|
||||
>this.#finalizationGroup.unregister(ref) : boolean
|
||||
> : ^^^^^^^
|
||||
>this.#finalizationGroup.unregister : (unregisterToken: WeakKey) => boolean
|
||||
> : ^ ^^ ^^^^^^^^^^^^
|
||||
>this.#finalizationGroup : FinalizationRegistry<{ readonly ref: WeakRef<object>; readonly set: Set<WeakRef<object>>; }>
|
||||
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
>this : this
|
||||
> : ^^^^
|
||||
>unregister : (unregisterToken: WeakKey) => void
|
||||
> : ^ ^^ ^^^^^^^^^
|
||||
>unregister : (unregisterToken: WeakKey) => boolean
|
||||
> : ^ ^^ ^^^^^^^^^^^^
|
||||
>ref : WeakRef<K>
|
||||
> : ^^^^^^^^^^
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user