From 0f89b4042ca71843011a1124860b207155391ea5 Mon Sep 17 00:00:00 2001 From: Bach Le Date: Wed, 7 Dec 2022 01:01:44 +0800 Subject: [PATCH 1/2] Use constructor signature for @final and @unmanaged --- std/assembly/index.d.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/std/assembly/index.d.ts b/std/assembly/index.d.ts index 65306fdfa9..352d00b0ac 100644 --- a/std/assembly/index.d.ts +++ b/std/assembly/index.d.ts @@ -2281,6 +2281,10 @@ interface TypedPropertyDescriptor { set?(value: T): void; } +type Constructor = + (new (...args: any[]) => unknown) + | (abstract new (...args: any[]) => unknown); + /** Annotates a method as a binary operator overload for the specified `token`. */ declare function operator(token: "[]" | "[]=" | "{}" | "{}=" | "==" | "!=" | ">" | "<" | "<=" | ">=" | @@ -2319,10 +2323,10 @@ declare namespace operator { declare function global(...args: any[]): any; /** Annotates a class as being unmanaged with limited capabilities. */ -declare function unmanaged(constructor: Function): void; +declare function unmanaged(constructor: Constructor): void; /** Annotates a class as being final / non-derivable. */ -declare function final(constructor: Function): void; +declare function final(constructor: Constructor): void; /** Annotates a method, function or constant global as always inlined. */ declare function inline(...args: any[]): any; From 698fabe41b5f22ce048d65087a2058c5212f9768 Mon Sep 17 00:00:00 2001 From: Bach Le Date: Wed, 7 Dec 2022 01:06:13 +0800 Subject: [PATCH 2/2] Add my name to the NOTICE file --- NOTICE | 1 + 1 file changed, 1 insertion(+) diff --git a/NOTICE b/NOTICE index 93a368305e..a9ddc72e21 100644 --- a/NOTICE +++ b/NOTICE @@ -54,6 +54,7 @@ under the licensing terms detailed in LICENSE: * Jairus Tanaka * CountBleck * Abdul Rauf +* Bach Le Portions of this software are derived from third-party works licensed under the following terms: