Skip to content

Commit 1d0451a

Browse files
authored
fix: Use constructor signature for class decorators (#2587)
1 parent 78b3260 commit 1d0451a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

NOTICE

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ under the licensing terms detailed in LICENSE:
5454
* Jairus Tanaka <[email protected]>
5555
* CountBleck <[email protected]>
5656
* Abdul Rauf <[email protected]>
57+
* Bach Le <[email protected]>
5758

5859
Portions of this software are derived from third-party works licensed under
5960
the following terms:

std/assembly/index.d.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -2281,6 +2281,10 @@ interface TypedPropertyDescriptor<T> {
22812281
set?(value: T): void;
22822282
}
22832283

2284+
type Constructor =
2285+
(new (...args: any[]) => unknown)
2286+
| (abstract new (...args: any[]) => unknown);
2287+
22842288
/** Annotates a method as a binary operator overload for the specified `token`. */
22852289
declare function operator(token:
22862290
"[]" | "[]=" | "{}" | "{}=" | "==" | "!=" | ">" | "<" | "<=" | ">=" |
@@ -2319,10 +2323,10 @@ declare namespace operator {
23192323
declare function global(...args: any[]): any;
23202324

23212325
/** Annotates a class as being unmanaged with limited capabilities. */
2322-
declare function unmanaged(constructor: Function): void;
2326+
declare function unmanaged(constructor: Constructor): void;
23232327

23242328
/** Annotates a class as being final / non-derivable. */
2325-
declare function final(constructor: Function): void;
2329+
declare function final(constructor: Constructor): void;
23262330

23272331
/** Annotates a method, function or constant global as always inlined. */
23282332
declare function inline(...args: any[]): any;

0 commit comments

Comments
 (0)