UNPKG

@tsonic/dotnet-pure

Version:

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

484 lines (373 loc) 18.2 kB
// Generated by tsbindgen - Architecture // Namespace: System.Collections.Specialized // Assembly: System.Collections.NonGeneric, System.Collections.Specialized, System.ObjectModel // 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 types from other namespaces import * as System_Collections_Internal from "../../System.Collections/internal/index.js"; import type { Hashtable, ICollection, IComparer, IDictionary, IDictionaryEnumerator, IEnumerable, IEnumerator, IEqualityComparer, IHashCodeProvider, IList, SortedList } from "../../System.Collections/internal/index.js"; import type { MethodInfo } from "../../System.Reflection/internal/index.js"; import * as System_Runtime_Serialization_Internal from "../../System.Runtime.Serialization/internal/index.js"; import type { IDeserializationCallback, ISerializable, SerializationInfo, StreamingContext } from "../../System.Runtime.Serialization/internal/index.js"; import * as System_Internal from "../../System/internal/index.js"; import type { Array as ClrArray, AsyncCallback, Boolean as ClrBoolean, Delegate, Enum, EventArgs, IAsyncResult, ICloneable, IComparable, IConvertible, IEquatable_1, IFormatProvider, IFormattable, Int16, Int32, IntPtr, ISpanFormattable, MulticastDelegate, Object as ClrObject, String as ClrString, Type, TypeCode, ValueType, 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 enum NotifyCollectionChangedAction { Add = 0, Remove = 1, Replace = 2, Move = 3, Reset = 4 } export type NotifyCollectionChangedEventHandler = (sender: unknown, e: NotifyCollectionChangedEventArgs) => void; export interface INotifyCollectionChanged$instance { } export type INotifyCollectionChanged = INotifyCollectionChanged$instance; export interface IOrderedDictionary$instance extends IDictionary, ICollection, IEnumerable { readonly Keys: ICollection; readonly Values: ICollection; readonly IsReadOnly: boolean; readonly IsFixedSize: boolean; readonly Count: int; readonly SyncRoot: unknown; readonly IsSynchronized: boolean; Add(key: unknown, value: unknown): void; Clear(): void; Contains(key: unknown): boolean; CopyTo(array: ClrArray, index: int): void; get_Item(index: int): unknown; get_Item(key: unknown): unknown; GetEnumerator(): IDictionaryEnumerator; GetEnumerator(): IEnumerator; Insert(index: int, key: unknown, value: unknown): void; Remove(key: unknown): void; RemoveAt(index: int): void; set_Item(index: int, value: unknown): void; set_Item(key: unknown, value: unknown): void; } export type IOrderedDictionary = IOrderedDictionary$instance; export interface BitVector32$instance { readonly Data: int; Equals(o: unknown): boolean; Equals(other: BitVector32): boolean; get_Item(bit: int): boolean; get_Item(section: BitVector32_Section): int; GetHashCode(): int; set_Item(bit: int, value: boolean): void; set_Item(section: BitVector32_Section, value: int): void; ToString(): string; } export const BitVector32: { new(data: int): BitVector32$instance; new(value: BitVector32): BitVector32$instance; CreateMask(): int; CreateMask(previous: int): int; CreateSection(maxValue: short, previous: BitVector32_Section): BitVector32_Section; CreateSection(maxValue: short): BitVector32_Section; ToString(value: BitVector32): string; }; export interface __BitVector32$views { As_IEquatable_1(): System_Internal.IEquatable_1$instance<BitVector32>; // Structural method bridges for numeric interface constraints Equals(other: BitVector32): boolean; } export type BitVector32 = BitVector32$instance & __BitVector32$views; export interface BitVector32_Section$instance { readonly Mask: short; readonly Offset: short; Equals(o: unknown): boolean; Equals(obj: BitVector32_Section): boolean; GetHashCode(): int; ToString(): string; } export const BitVector32_Section: { new(): BitVector32_Section$instance; ToString(value: BitVector32_Section): string; }; export interface __BitVector32_Section$views { As_IEquatable_1(): System_Internal.IEquatable_1$instance<BitVector32_Section>; // Structural method bridges for numeric interface constraints Equals(other: BitVector32_Section): boolean; } export type BitVector32_Section = BitVector32_Section$instance & __BitVector32_Section$views; export interface CollectionsUtil$instance { } export const CollectionsUtil: { new(): CollectionsUtil$instance; CreateCaseInsensitiveHashtable(): Hashtable; CreateCaseInsensitiveHashtable(d: IDictionary): Hashtable; CreateCaseInsensitiveHashtable(capacity: int): Hashtable; CreateCaseInsensitiveSortedList(): SortedList; }; export type CollectionsUtil = CollectionsUtil$instance; export interface HybridDictionary$instance { readonly Count: int; readonly IsFixedSize: boolean; readonly IsReadOnly: boolean; readonly IsSynchronized: boolean; Item: unknown; readonly Keys: ICollection; readonly SyncRoot: unknown; readonly Values: ICollection; Add(key: unknown, value: unknown): void; Clear(): void; Contains(key: unknown): boolean; CopyTo(array: ClrArray, index: int): void; GetEnumerator(): IDictionaryEnumerator; Remove(key: unknown): void; } export const HybridDictionary: { new(): HybridDictionary$instance; new(initialSize: int): HybridDictionary$instance; new(caseInsensitive: boolean): HybridDictionary$instance; new(initialSize: int, caseInsensitive: boolean): HybridDictionary$instance; }; export interface __HybridDictionary$views { As_ICollection(): System_Collections_Internal.ICollection$instance; As_IDictionary(): System_Collections_Internal.IDictionary$instance; As_IEnumerable(): System_Collections_Internal.IEnumerable$instance; } export type HybridDictionary = HybridDictionary$instance & __HybridDictionary$views; export interface ListDictionary$instance { readonly Count: int; readonly IsFixedSize: boolean; readonly IsReadOnly: boolean; readonly IsSynchronized: boolean; Item: unknown; readonly Keys: ICollection; readonly SyncRoot: unknown; readonly Values: ICollection; Add(key: unknown, value: unknown): void; Clear(): void; Contains(key: unknown): boolean; CopyTo(array: ClrArray, index: int): void; GetEnumerator(): IDictionaryEnumerator; Remove(key: unknown): void; } export const ListDictionary: { new(): ListDictionary$instance; new(comparer: IComparer): ListDictionary$instance; }; export interface __ListDictionary$views { As_ICollection(): System_Collections_Internal.ICollection$instance; As_IDictionary(): System_Collections_Internal.IDictionary$instance; As_IEnumerable(): System_Collections_Internal.IEnumerable$instance; } export type ListDictionary = ListDictionary$instance & __ListDictionary$views; export interface ListDictionary_DictionaryNode$instance { key: unknown; value: unknown; next: ListDictionary_DictionaryNode; } export const ListDictionary_DictionaryNode: { new(): ListDictionary_DictionaryNode$instance; }; export type ListDictionary_DictionaryNode = ListDictionary_DictionaryNode$instance; export interface NameObjectCollectionBase$instance { readonly Count: int; readonly Keys: NameObjectCollectionBase_KeysCollection; GetEnumerator(): IEnumerator; GetObjectData(info: SerializationInfo, context: StreamingContext): void; OnDeserialization(sender: unknown): void; } export const NameObjectCollectionBase: { }; export interface __NameObjectCollectionBase$views { As_ICollection(): System_Collections_Internal.ICollection$instance; As_IEnumerable(): System_Collections_Internal.IEnumerable$instance; As_IDeserializationCallback(): System_Runtime_Serialization_Internal.IDeserializationCallback$instance; As_ISerializable(): System_Runtime_Serialization_Internal.ISerializable$instance; } export interface NameObjectCollectionBase$instance extends System_Runtime_Serialization_Internal.IDeserializationCallback$instance, System_Runtime_Serialization_Internal.ISerializable$instance {} export type NameObjectCollectionBase = NameObjectCollectionBase$instance & __NameObjectCollectionBase$views; export interface NameObjectCollectionBase_KeysCollection$instance { readonly Count: int; readonly Item: string; Get(index: int): string; GetEnumerator(): IEnumerator; } export const NameObjectCollectionBase_KeysCollection: { new(): NameObjectCollectionBase_KeysCollection$instance; }; export interface __NameObjectCollectionBase_KeysCollection$views { As_ICollection(): System_Collections_Internal.ICollection$instance; As_IEnumerable(): System_Collections_Internal.IEnumerable$instance; } export type NameObjectCollectionBase_KeysCollection = NameObjectCollectionBase_KeysCollection$instance & __NameObjectCollectionBase_KeysCollection$views; export interface NameValueCollection$instance extends NameObjectCollectionBase$instance { readonly AllKeys: string[]; Add(c: NameValueCollection): void; Add(name: string, value: string): void; Clear(): void; CopyTo(dest: ClrArray, index: int): void; Get(name: string): string; Get(index: int): string; get_Item(name: string): string; get_Item(index: int): string; GetEnumerator(): IEnumerator; GetKey(index: int): string; GetObjectData(info: SerializationInfo, context: StreamingContext): void; GetValues(name: string): string[]; GetValues(index: int): string[]; HasKeys(): boolean; OnDeserialization(sender: unknown): void; Remove(name: string): void; Set(name: string, value: string): void; set_Item(name: string, value: string): void; } export const NameValueCollection: { new(): NameValueCollection$instance; new(col: NameValueCollection): NameValueCollection$instance; new(hashProvider: IHashCodeProvider, comparer: IComparer): NameValueCollection$instance; new(capacity: int): NameValueCollection$instance; new(equalityComparer: IEqualityComparer): NameValueCollection$instance; new(capacity: int, equalityComparer: IEqualityComparer): NameValueCollection$instance; new(capacity: int, col: NameValueCollection): NameValueCollection$instance; new(capacity: int, hashProvider: IHashCodeProvider, comparer: IComparer): NameValueCollection$instance; }; export interface __NameValueCollection$views { As_ICollection(): System_Collections_Internal.ICollection$instance; As_IEnumerable(): System_Collections_Internal.IEnumerable$instance; As_IDeserializationCallback(): System_Runtime_Serialization_Internal.IDeserializationCallback$instance; As_ISerializable(): System_Runtime_Serialization_Internal.ISerializable$instance; } export interface NameValueCollection$instance extends System_Collections_Internal.ICollection$instance {} export type NameValueCollection = NameValueCollection$instance & __NameValueCollection$views; export interface NotifyCollectionChangedEventArgs$instance extends EventArgs { readonly Action: NotifyCollectionChangedAction; readonly NewItems: IList; readonly NewStartingIndex: int; readonly OldItems: IList; readonly OldStartingIndex: int; } export const NotifyCollectionChangedEventArgs: { new(action: NotifyCollectionChangedAction): NotifyCollectionChangedEventArgs$instance; new(action: NotifyCollectionChangedAction, changedItem: unknown): NotifyCollectionChangedEventArgs$instance; new(action: NotifyCollectionChangedAction, changedItem: unknown, index: int): NotifyCollectionChangedEventArgs$instance; new(action: NotifyCollectionChangedAction, changedItems: IList): NotifyCollectionChangedEventArgs$instance; new(action: NotifyCollectionChangedAction, changedItems: IList, startingIndex: int): NotifyCollectionChangedEventArgs$instance; new(action: NotifyCollectionChangedAction, newItem: unknown, oldItem: unknown): NotifyCollectionChangedEventArgs$instance; new(action: NotifyCollectionChangedAction, newItem: unknown, oldItem: unknown, index: int): NotifyCollectionChangedEventArgs$instance; new(action: NotifyCollectionChangedAction, newItems: IList, oldItems: IList): NotifyCollectionChangedEventArgs$instance; new(action: NotifyCollectionChangedAction, newItems: IList, oldItems: IList, startingIndex: int): NotifyCollectionChangedEventArgs$instance; new(action: NotifyCollectionChangedAction, changedItem: unknown, index: int, oldIndex: int): NotifyCollectionChangedEventArgs$instance; new(action: NotifyCollectionChangedAction, changedItems: IList, index: int, oldIndex: int): NotifyCollectionChangedEventArgs$instance; }; export type NotifyCollectionChangedEventArgs = NotifyCollectionChangedEventArgs$instance; export interface OrderedDictionary$instance { readonly Count: int; readonly IsReadOnly: boolean; readonly Keys: ICollection; readonly Values: ICollection; Add(key: unknown, value: unknown): void; AsReadOnly(): OrderedDictionary; Clear(): void; Contains(key: unknown): boolean; CopyTo(array: ClrArray, index: int): void; get_Item(index: int): unknown; get_Item(key: unknown): unknown; GetEnumerator(): IDictionaryEnumerator; GetObjectData(info: SerializationInfo, context: StreamingContext): void; Insert(index: int, key: unknown, value: unknown): void; Remove(key: unknown): void; RemoveAt(index: int): void; set_Item(index: int, value: unknown): void; set_Item(key: unknown, value: unknown): void; } export const OrderedDictionary: { new(): OrderedDictionary$instance; new(capacity: int): OrderedDictionary$instance; new(comparer: IEqualityComparer): OrderedDictionary$instance; new(capacity: int, comparer: IEqualityComparer): OrderedDictionary$instance; }; export interface __OrderedDictionary$views { As_IOrderedDictionary(): IOrderedDictionary$instance; As_ICollection(): System_Collections_Internal.ICollection$instance; As_IDictionary(): System_Collections_Internal.IDictionary$instance; As_IEnumerable(): System_Collections_Internal.IEnumerable$instance; As_IDeserializationCallback(): System_Runtime_Serialization_Internal.IDeserializationCallback$instance; As_ISerializable(): System_Runtime_Serialization_Internal.ISerializable$instance; } export interface OrderedDictionary$instance extends System_Runtime_Serialization_Internal.IDeserializationCallback$instance, System_Runtime_Serialization_Internal.ISerializable$instance {} export type OrderedDictionary = OrderedDictionary$instance & __OrderedDictionary$views; export interface StringCollection$instance { readonly Count: int; readonly IsReadOnly: boolean; readonly IsSynchronized: boolean; Item: string; readonly SyncRoot: unknown; Add(value: string): int; AddRange(value: string[]): void; Clear(): void; Contains(value: string): boolean; CopyTo(array: string[], index: int): void; GetEnumerator(): StringEnumerator; IndexOf(value: string): int; Insert(index: int, value: string): void; Remove(value: string): void; RemoveAt(index: int): void; } export const StringCollection: { new(): StringCollection$instance; }; export interface __StringCollection$views { As_ICollection(): System_Collections_Internal.ICollection$instance; As_IEnumerable(): System_Collections_Internal.IEnumerable$instance; As_IList(): System_Collections_Internal.IList$instance; } export type StringCollection = StringCollection$instance & __StringCollection$views; export interface StringDictionary$instance { readonly Count: int; readonly IsSynchronized: boolean; Item: string; readonly Keys: ICollection; readonly SyncRoot: unknown; readonly Values: ICollection; Add(key: string, value: string): void; Clear(): void; ContainsKey(key: string): boolean; ContainsValue(value: string): boolean; CopyTo(array: ClrArray, index: int): void; GetEnumerator(): IEnumerator; Remove(key: string): void; } export const StringDictionary: { new(): StringDictionary$instance; }; export interface __StringDictionary$views { As_IEnumerable(): System_Collections_Internal.IEnumerable$instance; } export interface StringDictionary$instance extends System_Collections_Internal.IEnumerable$instance {} export type StringDictionary = StringDictionary$instance & __StringDictionary$views; export interface StringEnumerator$instance { readonly Current: string; MoveNext(): boolean; Reset(): void; } export const StringEnumerator: { new(): StringEnumerator$instance; }; export type StringEnumerator = StringEnumerator$instance;