From 16dbf4adc390c9fb7656372b42811c1929e755dd Mon Sep 17 00:00:00 2001 From: Aapo Alasuutari Date: Mon, 5 Sep 2022 06:26:52 +0300 Subject: feat(ext/ffi): Support bool FFI type (#15754) --- cli/dts/lib.deno.unstable.d.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cli/dts/lib.deno.unstable.d.ts') diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts index 09380387b..ae306d819 100644 --- a/cli/dts/lib.deno.unstable.d.ts +++ b/cli/dts/lib.deno.unstable.d.ts @@ -393,6 +393,8 @@ declare namespace Deno { | "usize" | "isize"; + type NativeBooleanType = "bool"; + type NativePointerType = "pointer"; type NativeBufferType = "buffer"; @@ -408,6 +410,7 @@ declare namespace Deno { export type NativeType = | NativeNumberType | NativeBigIntType + | NativeBooleanType | NativePointerType | NativeBufferType | NativeFunctionType; @@ -419,6 +422,7 @@ declare namespace Deno { type ToNativeTypeMap = & Record & Record + & Record & Record & Record & Record; @@ -455,6 +459,7 @@ declare namespace Deno { type FromNativeTypeMap = & Record & Record + & Record & Record & Record & Record; @@ -610,6 +615,8 @@ declare namespace Deno { pointer: bigint; + /** Gets a boolean at the specified byte offset from the pointer. */ + getBool(offset?: number): boolean; /** Gets an unsigned 8-bit integer at the specified byte offset from the pointer. */ getUint8(offset?: number): number; /** Gets a signed 8-bit integer at the specified byte offset from the pointer. */ -- cgit v1.2.3