diff options
author | Aapo Alasuutari <aapo.alasuutari@gmail.com> | 2024-05-30 05:30:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-30 08:00:11 +0530 |
commit | d67ee9a08be200dc1ce9a416c9cda82730e24b68 (patch) | |
tree | 40cfd61cfbf89e6a1347d40caaa9ab3cdd3b7e25 /cli/tsc/dts | |
parent | a379009bfdddc56d6400740ad7be86f8930952ab (diff) |
BREAKING(ffi/unstable): use BigInt representation in turbocall (#23983)
Built ontop of #23981, this sets FFI
turbocalls (Fast Call API) to use the BigInt representation.
Diffstat (limited to 'cli/tsc/dts')
-rw-r--r-- | cli/tsc/dts/lib.deno.unstable.d.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cli/tsc/dts/lib.deno.unstable.d.ts b/cli/tsc/dts/lib.deno.unstable.d.ts index a3e0d2eb0..4a92f6872 100644 --- a/cli/tsc/dts/lib.deno.unstable.d.ts +++ b/cli/tsc/dts/lib.deno.unstable.d.ts @@ -220,7 +220,7 @@ declare namespace Deno { : T extends NativeU32Enum<infer U> ? U : T extends NativeI32Enum<infer U> ? U : number - : T extends NativeBigIntType ? number | bigint + : T extends NativeBigIntType ? bigint : T extends NativeBooleanType ? boolean : T extends NativePointerType ? T extends NativeTypedPointer<infer U> ? U | null : PointerValue @@ -501,7 +501,7 @@ declare namespace Deno { */ export class UnsafePointer { /** Create a pointer from a numeric value. This one is <i>really</i> dangerous! */ - static create<T = unknown>(value: number | bigint): PointerValue<T>; + static create<T = unknown>(value: bigint): PointerValue<T>; /** Returns `true` if the two pointers point to the same address. */ static equals<T = unknown>(a: PointerValue<T>, b: PointerValue<T>): boolean; /** Return the direct memory pointer to the typed array in memory. */ @@ -514,7 +514,7 @@ declare namespace Deno { offset: number, ): PointerValue<T>; /** Get the numeric value of a pointer */ - static value(value: PointerValue): number | bigint; + static value(value: PointerValue): bigint; } /** **UNSTABLE**: New API, yet to be vetted. @@ -554,10 +554,10 @@ declare namespace Deno { getInt32(offset?: number): number; /** Gets an unsigned 64-bit integer at the specified byte offset from the * pointer. */ - getBigUint64(offset?: number): number | bigint; + getBigUint64(offset?: number): bigint; /** Gets a signed 64-bit integer at the specified byte offset from the * pointer. */ - getBigInt64(offset?: number): number | bigint; + getBigInt64(offset?: number): bigint; /** Gets a signed 32-bit float at the specified byte offset from the * pointer. */ getFloat32(offset?: number): number; @@ -816,7 +816,7 @@ declare namespace Deno { * ); * * // Call the symbol `add` - * const result = dylib.symbols.add(35, 34); // 69 + * const result = dylib.symbols.add(35n, 34n); // 69n * * console.log(`Result from external addition of 35 and 34: ${result}`); * ``` |