UNPKG

@tsonic/dotnet

Version:

TypeScript type definitions for .NET 10 BCL (Base Class Library)

172 lines (163 loc) 13.5 kB
// Generated by tsbindgen - Architecture // Namespace: System.Buffers.Binary // Assembly: System.Private.CoreLib // Branded primitive types are sourced from @tsonic/types import type { sbyte, byte, short, ushort, int, uint, long, ulong, int128, uint128, half, float, double, decimal, nint, nuint, char } from '@tsonic/types'; // Import support types from @tsonic/types import type { ptr, ref } from "@tsonic/types"; // Import types from other namespaces import * as System_Internal from "../../System/internal/index.js"; import type { Boolean as ClrBoolean, Byte, Double, Half, Int128, Int16, Int32, Int64, IntPtr, Object as ClrObject, ReadOnlySpan_1, SByte, Single, Span_1, String as ClrString, Type, UInt128, UInt16, UInt32, UInt64, UIntPtr, Void } from "../../System/internal/index.js"; // CLROf<T> - Maps ergonomic primitives to their CLR types for generic constraints // This utility is used ONLY in generic type arguments to satisfy CLR interface constraints // Value positions (parameters, return types) use lowercase primitives for ergonomics export type CLROf<T> = T extends sbyte ? System_Internal.SByte : T extends short ? System_Internal.Int16 : T extends int ? System_Internal.Int32 : T extends long ? System_Internal.Int64 : T extends int128 ? System_Internal.Int128 : T extends nint ? System_Internal.IntPtr : T extends byte ? System_Internal.Byte : T extends ushort ? System_Internal.UInt16 : T extends uint ? System_Internal.UInt32 : T extends ulong ? System_Internal.UInt64 : T extends uint128 ? System_Internal.UInt128 : T extends nuint ? System_Internal.UIntPtr : T extends half ? System_Internal.Half : T extends float ? System_Internal.Single : T extends double ? System_Internal.Double : T extends decimal ? System_Internal.Decimal : T extends char ? System_Internal.Char : T extends boolean ? System_Internal.Boolean : T extends string ? System_Internal.String : T; // Identity fallback for non-primitive types export abstract class BinaryPrimitives$instance { static readDoubleBigEndian(source: ReadOnlySpan_1<CLROf<byte>>): double; static readDoubleLittleEndian(source: ReadOnlySpan_1<CLROf<byte>>): double; static readHalfBigEndian(source: ReadOnlySpan_1<CLROf<byte>>): half; static readHalfLittleEndian(source: ReadOnlySpan_1<CLROf<byte>>): half; static readInt128BigEndian(source: ReadOnlySpan_1<CLROf<byte>>): int128; static readInt128LittleEndian(source: ReadOnlySpan_1<CLROf<byte>>): int128; static readInt16BigEndian(source: ReadOnlySpan_1<CLROf<byte>>): short; static readInt16LittleEndian(source: ReadOnlySpan_1<CLROf<byte>>): short; static readInt32BigEndian(source: ReadOnlySpan_1<CLROf<byte>>): int; static readInt32LittleEndian(source: ReadOnlySpan_1<CLROf<byte>>): int; static readInt64BigEndian(source: ReadOnlySpan_1<CLROf<byte>>): long; static readInt64LittleEndian(source: ReadOnlySpan_1<CLROf<byte>>): long; static readIntPtrBigEndian(source: ReadOnlySpan_1<CLROf<byte>>): nint; static readIntPtrLittleEndian(source: ReadOnlySpan_1<CLROf<byte>>): nint; static readSingleBigEndian(source: ReadOnlySpan_1<CLROf<byte>>): float; static readSingleLittleEndian(source: ReadOnlySpan_1<CLROf<byte>>): float; static readUInt128BigEndian(source: ReadOnlySpan_1<CLROf<byte>>): uint128; static readUInt128LittleEndian(source: ReadOnlySpan_1<CLROf<byte>>): uint128; static readUInt16BigEndian(source: ReadOnlySpan_1<CLROf<byte>>): ushort; static readUInt16LittleEndian(source: ReadOnlySpan_1<CLROf<byte>>): ushort; static readUInt32BigEndian(source: ReadOnlySpan_1<CLROf<byte>>): uint; static readUInt32LittleEndian(source: ReadOnlySpan_1<CLROf<byte>>): uint; static readUInt64BigEndian(source: ReadOnlySpan_1<CLROf<byte>>): ulong; static readUInt64LittleEndian(source: ReadOnlySpan_1<CLROf<byte>>): ulong; static readUIntPtrBigEndian(source: ReadOnlySpan_1<CLROf<byte>>): nuint; static readUIntPtrLittleEndian(source: ReadOnlySpan_1<CLROf<byte>>): nuint; static reverseEndianness(value: byte): byte; static reverseEndianness(value: int128): int128; static reverseEndianness(value: short): short; static reverseEndianness(value: int): int; static reverseEndianness(value: long): long; static reverseEndianness(value: nint): nint; static reverseEndianness(source: ReadOnlySpan_1<CLROf<int128>>, destination: Span_1<CLROf<int128>>): void; static reverseEndianness(source: ReadOnlySpan_1<CLROf<short>>, destination: Span_1<CLROf<short>>): void; static reverseEndianness(source: ReadOnlySpan_1<CLROf<int>>, destination: Span_1<CLROf<int>>): void; static reverseEndianness(source: ReadOnlySpan_1<CLROf<long>>, destination: Span_1<CLROf<long>>): void; static reverseEndianness(source: ReadOnlySpan_1<CLROf<nint>>, destination: Span_1<CLROf<nint>>): void; static reverseEndianness(source: ReadOnlySpan_1<CLROf<uint128>>, destination: Span_1<CLROf<uint128>>): void; static reverseEndianness(source: ReadOnlySpan_1<CLROf<ushort>>, destination: Span_1<CLROf<ushort>>): void; static reverseEndianness(source: ReadOnlySpan_1<CLROf<uint>>, destination: Span_1<CLROf<uint>>): void; static reverseEndianness(source: ReadOnlySpan_1<CLROf<ulong>>, destination: Span_1<CLROf<ulong>>): void; static reverseEndianness(source: ReadOnlySpan_1<CLROf<nuint>>, destination: Span_1<CLROf<nuint>>): void; static reverseEndianness(value: sbyte): sbyte; static reverseEndianness(value: uint128): uint128; static reverseEndianness(value: ushort): ushort; static reverseEndianness(value: uint): uint; static reverseEndianness(value: ulong): ulong; static reverseEndianness(value: nuint): nuint; static tryReadDoubleBigEndian(source: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<double> }): boolean; static tryReadDoubleLittleEndian(source: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<double> }): boolean; static tryReadHalfBigEndian(source: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<half> }): boolean; static tryReadHalfLittleEndian(source: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<half> }): boolean; static tryReadInt128BigEndian(source: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<int128> }): boolean; static tryReadInt128LittleEndian(source: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<int128> }): boolean; static tryReadInt16BigEndian(source: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<short> }): boolean; static tryReadInt16LittleEndian(source: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<short> }): boolean; static tryReadInt32BigEndian(source: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<int> }): boolean; static tryReadInt32LittleEndian(source: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<int> }): boolean; static tryReadInt64BigEndian(source: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<long> }): boolean; static tryReadInt64LittleEndian(source: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<long> }): boolean; static tryReadIntPtrBigEndian(source: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<nint> }): boolean; static tryReadIntPtrLittleEndian(source: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<nint> }): boolean; static tryReadSingleBigEndian(source: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<float> }): boolean; static tryReadSingleLittleEndian(source: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<float> }): boolean; static tryReadUInt128BigEndian(source: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<uint128> }): boolean; static tryReadUInt128LittleEndian(source: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<uint128> }): boolean; static tryReadUInt16BigEndian(source: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<ushort> }): boolean; static tryReadUInt16LittleEndian(source: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<ushort> }): boolean; static tryReadUInt32BigEndian(source: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<uint> }): boolean; static tryReadUInt32LittleEndian(source: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<uint> }): boolean; static tryReadUInt64BigEndian(source: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<ulong> }): boolean; static tryReadUInt64LittleEndian(source: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<ulong> }): boolean; static tryReadUIntPtrBigEndian(source: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<nuint> }): boolean; static tryReadUIntPtrLittleEndian(source: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<nuint> }): boolean; static tryWriteDoubleBigEndian(destination: Span_1<CLROf<byte>>, value: double): boolean; static tryWriteDoubleLittleEndian(destination: Span_1<CLROf<byte>>, value: double): boolean; static tryWriteHalfBigEndian(destination: Span_1<CLROf<byte>>, value: half): boolean; static tryWriteHalfLittleEndian(destination: Span_1<CLROf<byte>>, value: half): boolean; static tryWriteInt128BigEndian(destination: Span_1<CLROf<byte>>, value: int128): boolean; static tryWriteInt128LittleEndian(destination: Span_1<CLROf<byte>>, value: int128): boolean; static tryWriteInt16BigEndian(destination: Span_1<CLROf<byte>>, value: short): boolean; static tryWriteInt16LittleEndian(destination: Span_1<CLROf<byte>>, value: short): boolean; static tryWriteInt32BigEndian(destination: Span_1<CLROf<byte>>, value: int): boolean; static tryWriteInt32LittleEndian(destination: Span_1<CLROf<byte>>, value: int): boolean; static tryWriteInt64BigEndian(destination: Span_1<CLROf<byte>>, value: long): boolean; static tryWriteInt64LittleEndian(destination: Span_1<CLROf<byte>>, value: long): boolean; static tryWriteIntPtrBigEndian(destination: Span_1<CLROf<byte>>, value: nint): boolean; static tryWriteIntPtrLittleEndian(destination: Span_1<CLROf<byte>>, value: nint): boolean; static tryWriteSingleBigEndian(destination: Span_1<CLROf<byte>>, value: float): boolean; static tryWriteSingleLittleEndian(destination: Span_1<CLROf<byte>>, value: float): boolean; static tryWriteUInt128BigEndian(destination: Span_1<CLROf<byte>>, value: uint128): boolean; static tryWriteUInt128LittleEndian(destination: Span_1<CLROf<byte>>, value: uint128): boolean; static tryWriteUInt16BigEndian(destination: Span_1<CLROf<byte>>, value: ushort): boolean; static tryWriteUInt16LittleEndian(destination: Span_1<CLROf<byte>>, value: ushort): boolean; static tryWriteUInt32BigEndian(destination: Span_1<CLROf<byte>>, value: uint): boolean; static tryWriteUInt32LittleEndian(destination: Span_1<CLROf<byte>>, value: uint): boolean; static tryWriteUInt64BigEndian(destination: Span_1<CLROf<byte>>, value: ulong): boolean; static tryWriteUInt64LittleEndian(destination: Span_1<CLROf<byte>>, value: ulong): boolean; static tryWriteUIntPtrBigEndian(destination: Span_1<CLROf<byte>>, value: nuint): boolean; static tryWriteUIntPtrLittleEndian(destination: Span_1<CLROf<byte>>, value: nuint): boolean; static writeDoubleBigEndian(destination: Span_1<CLROf<byte>>, value: double): void; static writeDoubleLittleEndian(destination: Span_1<CLROf<byte>>, value: double): void; static writeHalfBigEndian(destination: Span_1<CLROf<byte>>, value: half): void; static writeHalfLittleEndian(destination: Span_1<CLROf<byte>>, value: half): void; static writeInt128BigEndian(destination: Span_1<CLROf<byte>>, value: int128): void; static writeInt128LittleEndian(destination: Span_1<CLROf<byte>>, value: int128): void; static writeInt16BigEndian(destination: Span_1<CLROf<byte>>, value: short): void; static writeInt16LittleEndian(destination: Span_1<CLROf<byte>>, value: short): void; static writeInt32BigEndian(destination: Span_1<CLROf<byte>>, value: int): void; static writeInt32LittleEndian(destination: Span_1<CLROf<byte>>, value: int): void; static writeInt64BigEndian(destination: Span_1<CLROf<byte>>, value: long): void; static writeInt64LittleEndian(destination: Span_1<CLROf<byte>>, value: long): void; static writeIntPtrBigEndian(destination: Span_1<CLROf<byte>>, value: nint): void; static writeIntPtrLittleEndian(destination: Span_1<CLROf<byte>>, value: nint): void; static writeSingleBigEndian(destination: Span_1<CLROf<byte>>, value: float): void; static writeSingleLittleEndian(destination: Span_1<CLROf<byte>>, value: float): void; static writeUInt128BigEndian(destination: Span_1<CLROf<byte>>, value: uint128): void; static writeUInt128LittleEndian(destination: Span_1<CLROf<byte>>, value: uint128): void; static writeUInt16BigEndian(destination: Span_1<CLROf<byte>>, value: ushort): void; static writeUInt16LittleEndian(destination: Span_1<CLROf<byte>>, value: ushort): void; static writeUInt32BigEndian(destination: Span_1<CLROf<byte>>, value: uint): void; static writeUInt32LittleEndian(destination: Span_1<CLROf<byte>>, value: uint): void; static writeUInt64BigEndian(destination: Span_1<CLROf<byte>>, value: ulong): void; static writeUInt64LittleEndian(destination: Span_1<CLROf<byte>>, value: ulong): void; static writeUIntPtrBigEndian(destination: Span_1<CLROf<byte>>, value: nuint): void; static writeUIntPtrLittleEndian(destination: Span_1<CLROf<byte>>, value: nuint): void; } export type BinaryPrimitives = BinaryPrimitives$instance;