Revert changes to WeakSet defitions adding object
constraint
This reverts the changes to WeakSet done in https://github.com/Microsoft/TypeScript/pull/15124 to avoid breaks in existing @types packages like @types/lodash
This commit is contained in:
parent
1d28c88cf8
commit
552f1d85c9
3 changed files with 3 additions and 3 deletions
2
src/lib/es2015.collection.d.ts
vendored
2
src/lib/es2015.collection.d.ts
vendored
|
@ -58,7 +58,7 @@ interface ReadonlySet<T> {
|
|||
readonly size: number;
|
||||
}
|
||||
|
||||
interface WeakSet<T extends object> {
|
||||
interface WeakSet<T> {
|
||||
add(value: T): this;
|
||||
delete(value: T): boolean;
|
||||
has(value: T): boolean;
|
||||
|
|
2
src/lib/es2015.iterable.d.ts
vendored
2
src/lib/es2015.iterable.d.ts
vendored
|
@ -118,7 +118,7 @@ interface SetConstructor {
|
|||
new <T>(iterable: Iterable<T>): Set<T>;
|
||||
}
|
||||
|
||||
interface WeakSet<T extends object> { }
|
||||
interface WeakSet<T> { }
|
||||
|
||||
interface WeakSetConstructor {
|
||||
new <T extends object>(iterable: Iterable<T>): WeakSet<T>;
|
||||
|
|
2
src/lib/es2015.symbol.wellknown.d.ts
vendored
2
src/lib/es2015.symbol.wellknown.d.ts
vendored
|
@ -118,7 +118,7 @@ interface Set<T> {
|
|||
readonly [Symbol.toStringTag]: "Set";
|
||||
}
|
||||
|
||||
interface WeakSet<T extends object> {
|
||||
interface WeakSet<T> {
|
||||
readonly [Symbol.toStringTag]: "WeakSet";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue