@tsonic/dotnet
Version:
TypeScript type definitions for .NET 10 BCL (Base Class Library)
258 lines (236 loc) • 13 kB
TypeScript
// Generated by tsbindgen - Architecture
// Namespace: System.Text.Unicode
// Assembly: System.Private.CoreLib, System.Text.Encodings.Web
// 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 type { OperationStatus } from "../../System.Buffers/internal/index.js";
import * as System_Internal from "../../System/internal/index.js";
import type { Boolean as ClrBoolean, Byte, Char, IFormatProvider, Int32, Object as ClrObject, ReadOnlySpan_1, Span_1, String as ClrString, Type, ValueType } 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 interface Utf8_TryWriteInterpolatedStringHandler$instance {
appendFormatted<T>(value: T): boolean;
appendFormatted<T>(value: T, format: string): boolean;
appendFormatted<T>(value: T, alignment: int): boolean;
appendFormatted<T>(value: T, alignment: int, format: string): boolean;
appendFormatted(value: ReadOnlySpan_1<CLROf<char>>): boolean;
appendFormatted(value: ReadOnlySpan_1<CLROf<char>>, alignment?: int, format?: string): boolean;
appendFormatted(utf8Value: ReadOnlySpan_1<CLROf<byte>>): boolean;
appendFormatted(utf8Value: ReadOnlySpan_1<CLROf<byte>>, alignment?: int, format?: string): boolean;
appendFormatted(value: string): boolean;
appendFormatted(value: string, alignment?: int, format?: string): boolean;
appendFormatted(value: unknown, alignment?: int, format?: string): boolean;
appendLiteral(value: string): boolean;
}
export const Utf8_TryWriteInterpolatedStringHandler: {
new(literalLength: int, formattedCount: int, destination: Span_1<CLROf<byte>>, shouldAppend: ref<boolean>): Utf8_TryWriteInterpolatedStringHandler$instance;
new(literalLength: int, formattedCount: int, destination: Span_1<CLROf<byte>>, provider: IFormatProvider, shouldAppend: ref<boolean>): Utf8_TryWriteInterpolatedStringHandler$instance;
};
export type Utf8_TryWriteInterpolatedStringHandler = Utf8_TryWriteInterpolatedStringHandler$instance;
export interface UnicodeRange$instance {
readonly firstCodePoint: int;
readonly length: int;
}
export const UnicodeRange: {
new(firstCodePoint: int, length: int): UnicodeRange$instance;
create(firstCharacter: char, lastCharacter: char): UnicodeRange;
};
export type UnicodeRange = UnicodeRange$instance;
export abstract class UnicodeRanges$instance {
static readonly none: UnicodeRange;
static readonly all: UnicodeRange;
static readonly basicLatin: UnicodeRange;
static readonly latin1Supplement: UnicodeRange;
static readonly latinExtendedA: UnicodeRange;
static readonly latinExtendedB: UnicodeRange;
static readonly ipaExtensions: UnicodeRange;
static readonly spacingModifierLetters: UnicodeRange;
static readonly combiningDiacriticalMarks: UnicodeRange;
static readonly greekandCoptic: UnicodeRange;
static readonly cyrillic: UnicodeRange;
static readonly cyrillicSupplement: UnicodeRange;
static readonly armenian: UnicodeRange;
static readonly hebrew: UnicodeRange;
static readonly arabic: UnicodeRange;
static readonly syriac: UnicodeRange;
static readonly arabicSupplement: UnicodeRange;
static readonly thaana: UnicodeRange;
static readonly nKo: UnicodeRange;
static readonly samaritan: UnicodeRange;
static readonly mandaic: UnicodeRange;
static readonly syriacSupplement: UnicodeRange;
static readonly arabicExtendedB: UnicodeRange;
static readonly arabicExtendedA: UnicodeRange;
static readonly devanagari: UnicodeRange;
static readonly bengali: UnicodeRange;
static readonly gurmukhi: UnicodeRange;
static readonly gujarati: UnicodeRange;
static readonly oriya: UnicodeRange;
static readonly tamil: UnicodeRange;
static readonly telugu: UnicodeRange;
static readonly kannada: UnicodeRange;
static readonly malayalam: UnicodeRange;
static readonly sinhala: UnicodeRange;
static readonly thai: UnicodeRange;
static readonly lao: UnicodeRange;
static readonly tibetan: UnicodeRange;
static readonly myanmar: UnicodeRange;
static readonly georgian: UnicodeRange;
static readonly hangulJamo: UnicodeRange;
static readonly ethiopic: UnicodeRange;
static readonly ethiopicSupplement: UnicodeRange;
static readonly cherokee: UnicodeRange;
static readonly unifiedCanadianAboriginalSyllabics: UnicodeRange;
static readonly ogham: UnicodeRange;
static readonly runic: UnicodeRange;
static readonly tagalog: UnicodeRange;
static readonly hanunoo: UnicodeRange;
static readonly buhid: UnicodeRange;
static readonly tagbanwa: UnicodeRange;
static readonly khmer: UnicodeRange;
static readonly mongolian: UnicodeRange;
static readonly unifiedCanadianAboriginalSyllabicsExtended: UnicodeRange;
static readonly limbu: UnicodeRange;
static readonly taiLe: UnicodeRange;
static readonly newTaiLue: UnicodeRange;
static readonly khmerSymbols: UnicodeRange;
static readonly buginese: UnicodeRange;
static readonly taiTham: UnicodeRange;
static readonly combiningDiacriticalMarksExtended: UnicodeRange;
static readonly balinese: UnicodeRange;
static readonly sundanese: UnicodeRange;
static readonly batak: UnicodeRange;
static readonly lepcha: UnicodeRange;
static readonly olChiki: UnicodeRange;
static readonly cyrillicExtendedC: UnicodeRange;
static readonly georgianExtended: UnicodeRange;
static readonly sundaneseSupplement: UnicodeRange;
static readonly vedicExtensions: UnicodeRange;
static readonly phoneticExtensions: UnicodeRange;
static readonly phoneticExtensionsSupplement: UnicodeRange;
static readonly combiningDiacriticalMarksSupplement: UnicodeRange;
static readonly latinExtendedAdditional: UnicodeRange;
static readonly greekExtended: UnicodeRange;
static readonly generalPunctuation: UnicodeRange;
static readonly superscriptsandSubscripts: UnicodeRange;
static readonly currencySymbols: UnicodeRange;
static readonly combiningDiacriticalMarksforSymbols: UnicodeRange;
static readonly letterlikeSymbols: UnicodeRange;
static readonly numberForms: UnicodeRange;
static readonly arrows: UnicodeRange;
static readonly mathematicalOperators: UnicodeRange;
static readonly miscellaneousTechnical: UnicodeRange;
static readonly controlPictures: UnicodeRange;
static readonly opticalCharacterRecognition: UnicodeRange;
static readonly enclosedAlphanumerics: UnicodeRange;
static readonly boxDrawing: UnicodeRange;
static readonly blockElements: UnicodeRange;
static readonly geometricShapes: UnicodeRange;
static readonly miscellaneousSymbols: UnicodeRange;
static readonly dingbats: UnicodeRange;
static readonly miscellaneousMathematicalSymbolsA: UnicodeRange;
static readonly supplementalArrowsA: UnicodeRange;
static readonly braillePatterns: UnicodeRange;
static readonly supplementalArrowsB: UnicodeRange;
static readonly miscellaneousMathematicalSymbolsB: UnicodeRange;
static readonly supplementalMathematicalOperators: UnicodeRange;
static readonly miscellaneousSymbolsandArrows: UnicodeRange;
static readonly glagolitic: UnicodeRange;
static readonly latinExtendedC: UnicodeRange;
static readonly coptic: UnicodeRange;
static readonly georgianSupplement: UnicodeRange;
static readonly tifinagh: UnicodeRange;
static readonly ethiopicExtended: UnicodeRange;
static readonly cyrillicExtendedA: UnicodeRange;
static readonly supplementalPunctuation: UnicodeRange;
static readonly cjkRadicalsSupplement: UnicodeRange;
static readonly kangxiRadicals: UnicodeRange;
static readonly ideographicDescriptionCharacters: UnicodeRange;
static readonly cjkSymbolsandPunctuation: UnicodeRange;
static readonly hiragana: UnicodeRange;
static readonly katakana: UnicodeRange;
static readonly bopomofo: UnicodeRange;
static readonly hangulCompatibilityJamo: UnicodeRange;
static readonly kanbun: UnicodeRange;
static readonly bopomofoExtended: UnicodeRange;
static readonly cjkStrokes: UnicodeRange;
static readonly katakanaPhoneticExtensions: UnicodeRange;
static readonly enclosedCjkLettersandMonths: UnicodeRange;
static readonly cjkCompatibility: UnicodeRange;
static readonly cjkUnifiedIdeographsExtensionA: UnicodeRange;
static readonly yijingHexagramSymbols: UnicodeRange;
static readonly cjkUnifiedIdeographs: UnicodeRange;
static readonly yiSyllables: UnicodeRange;
static readonly yiRadicals: UnicodeRange;
static readonly lisu: UnicodeRange;
static readonly vai: UnicodeRange;
static readonly cyrillicExtendedB: UnicodeRange;
static readonly bamum: UnicodeRange;
static readonly modifierToneLetters: UnicodeRange;
static readonly latinExtendedD: UnicodeRange;
static readonly sylotiNagri: UnicodeRange;
static readonly commonIndicNumberForms: UnicodeRange;
static readonly phagspa: UnicodeRange;
static readonly saurashtra: UnicodeRange;
static readonly devanagariExtended: UnicodeRange;
static readonly kayahLi: UnicodeRange;
static readonly rejang: UnicodeRange;
static readonly hangulJamoExtendedA: UnicodeRange;
static readonly javanese: UnicodeRange;
static readonly myanmarExtendedB: UnicodeRange;
static readonly cham: UnicodeRange;
static readonly myanmarExtendedA: UnicodeRange;
static readonly taiViet: UnicodeRange;
static readonly meeteiMayekExtensions: UnicodeRange;
static readonly ethiopicExtendedA: UnicodeRange;
static readonly latinExtendedE: UnicodeRange;
static readonly cherokeeSupplement: UnicodeRange;
static readonly meeteiMayek: UnicodeRange;
static readonly hangulSyllables: UnicodeRange;
static readonly hangulJamoExtendedB: UnicodeRange;
static readonly cjkCompatibilityIdeographs: UnicodeRange;
static readonly alphabeticPresentationForms: UnicodeRange;
static readonly arabicPresentationFormsA: UnicodeRange;
static readonly variationSelectors: UnicodeRange;
static readonly verticalForms: UnicodeRange;
static readonly combiningHalfMarks: UnicodeRange;
static readonly cjkCompatibilityForms: UnicodeRange;
static readonly smallFormVariants: UnicodeRange;
static readonly arabicPresentationFormsB: UnicodeRange;
static readonly halfwidthandFullwidthForms: UnicodeRange;
static readonly specials: UnicodeRange;
}
export type UnicodeRanges = UnicodeRanges$instance;
export abstract class Utf8$instance {
static fromUtf16(source: ReadOnlySpan_1<CLROf<char>>, destination: Span_1<CLROf<byte>>, charsRead: { value: ref<int> }, bytesWritten: { value: ref<int> }, replaceInvalidSequences?: boolean, isFinalBlock?: boolean): OperationStatus;
static isValid(value: ReadOnlySpan_1<CLROf<byte>>): boolean;
static toUtf16(source: ReadOnlySpan_1<CLROf<byte>>, destination: Span_1<CLROf<char>>, bytesRead: { value: ref<int> }, charsWritten: { value: ref<int> }, replaceInvalidSequences?: boolean, isFinalBlock?: boolean): OperationStatus;
static tryWrite(destination: Span_1<CLROf<byte>>, provider: IFormatProvider, handler: { value: ref<Utf8_TryWriteInterpolatedStringHandler> }, bytesWritten: { value: ref<int> }): boolean;
static tryWrite(destination: Span_1<CLROf<byte>>, handler: { value: ref<Utf8_TryWriteInterpolatedStringHandler> }, bytesWritten: { value: ref<int> }): boolean;
}
export type Utf8 = Utf8$instance;