@tsonic/dotnet-pure
Version:
TypeScript type definitions for .NET 10 BCL (Base Class Library) - CLR naming
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;