summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/dts/lib.deno.unstable.d.ts12
1 files changed, 10 insertions, 2 deletions
diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts
index b8eb886e4..12f53b784 100644
--- a/cli/dts/lib.deno.unstable.d.ts
+++ b/cli/dts/lib.deno.unstable.d.ts
@@ -372,17 +372,25 @@ declare namespace Deno {
}
/** All possible number types interfacing with foreign functions */
- type StaticNativeNumberType = Exclude<NativeType, "void" | "pointer">;
+ type StaticNativeNumberType = Exclude<
+ NativeType,
+ "void" | "pointer" | StaticNativeBigIntType
+ >;
+
+ /** All possible bigint types interfacing with foreign functions */
+ type StaticNativeBigIntType = "u64" | "i64" | "usize" | "isize";
/** Infers a foreign function return type */
type StaticForeignFunctionResult<T extends NativeType> = T extends "void"
? void
+ : T extends StaticNativeBigIntType ? bigint
: T extends StaticNativeNumberType ? number
: T extends "pointer" ? UnsafePointer
: never;
type StaticForeignFunctionParameter<T> = T extends "void" ? void
- : T extends StaticNativeNumberType ? number
+ : T extends StaticNativeNumberType | StaticNativeBigIntType
+ ? number | bigint
: T extends "pointer" ? Deno.UnsafePointer | Deno.TypedArray | null
: unknown;