Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/cli/tsc/dts/lib.deno.ns.d.ts>Deno.ToNativeResultType

A modern runtime for JavaScript and TypeScript.
Latest
type alias Deno.ToNativeResultType
import { type Deno } from "https://deno.land/x/deno@v2.0.4/cli/tsc/dts/lib.deno.ns.d.ts";
const { ToNativeResultType } = Deno;

Type conversion for unsafe callback return types.

definition: T extends NativeStructType ? BufferSource : T extends NativeNumberType ? T extends NativeU8Enum<infer U> ? U : T extends NativeI8Enum<infer U> ? U : T extends NativeU16Enum<infer U> ? U : T extends NativeI16Enum<infer U> ? U : T extends NativeU32Enum<infer U> ? U : T extends NativeI32Enum<infer U> ? U : number : T extends NativeBigIntType ? bigint : T extends NativeBooleanType ? boolean : T extends NativePointerType ? T extends NativeTypedPointer<infer U> ? U | null : PointerValue : T extends NativeFunctionType ? T extends NativeTypedFunction<infer U> ? PointerObject<U> | null : PointerValue : T extends NativeBufferType ? BufferSource | null : T extends NativeVoidType ? void : never