diff options
author | Aapo Alasuutari <aapo.alasuutari@gmail.com> | 2022-09-05 06:26:52 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-05 08:56:52 +0530 |
commit | 16dbf4adc390c9fb7656372b42811c1929e755dd (patch) | |
tree | bff7c876c97e5eb56d2d08de0198fe7640ddb031 /cli | |
parent | 08a6af398fd92517193e20117f9971c272b1bb5f (diff) |
feat(ext/ffi): Support bool FFI type (#15754)
Diffstat (limited to 'cli')
-rw-r--r-- | cli/dts/lib.deno.unstable.d.ts | 7 |
1 files changed, 7 insertions, 0 deletions
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<NativeNumberType, number> & Record<NativeBigIntType, PointerValue> + & Record<NativeBooleanType, boolean> & Record<NativePointerType, PointerValue | null> & Record<NativeFunctionType, PointerValue | null> & Record<NativeBufferType, TypedArray | null>; @@ -455,6 +459,7 @@ declare namespace Deno { type FromNativeTypeMap = & Record<NativeNumberType, number> & Record<NativeBigIntType, PointerValue> + & Record<NativeBooleanType, boolean> & Record<NativePointerType, PointerValue> & Record<NativeBufferType, PointerValue> & Record<NativeFunctionType, PointerValue>; @@ -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. */ |