@tsonic/dotnet
Version:
TypeScript type definitions for .NET 10 BCL (Base Class Library)
102 lines (77 loc) • 4.09 kB
TypeScript
// Generated by tsbindgen - Architecture
// Namespace: System.Timers
// Assembly: System.ComponentModel.TypeConverter
// 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_ComponentModel_Internal from "../../System.ComponentModel/internal/index.js";
import type { Component, DescriptionAttribute, IComponent, IContainer, ISite, ISupportInitialize, ISynchronizeInvoke } from "../../System.ComponentModel/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 { ISerializable, SerializationInfo, StreamingContext } from "../../System.Runtime.Serialization/internal/index.js";
import * as System_Internal from "../../System/internal/index.js";
import type { AsyncCallback, Boolean as ClrBoolean, DateTime, Delegate, Double, EventArgs, IAsyncResult, ICloneable, IDisposable, Int32, IntPtr, MulticastDelegate, Object as ClrObject, String as ClrString, TimeSpan, Type, 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 type ElapsedEventHandler = (sender: unknown, e: ElapsedEventArgs) => void;
export interface ElapsedEventArgs$instance extends EventArgs {
readonly signalTime: DateTime;
}
export const ElapsedEventArgs: {
new(signalTime: DateTime): ElapsedEventArgs$instance;
};
export type ElapsedEventArgs = ElapsedEventArgs$instance;
export interface Timer$instance extends Component {
autoReset: boolean;
enabled: boolean;
interval: double;
site: ISite;
synchronizingObject: ISynchronizeInvoke;
beginInit(): void;
close(): void;
dispose(): void;
endInit(): void;
start(): void;
stop(): void;
}
export const Timer: {
new(): Timer$instance;
new(interval: double): Timer$instance;
new(interval: TimeSpan): Timer$instance;
};
export interface __Timer$views {
As_IComponent(): System_ComponentModel_Internal.IComponent$instance;
As_ISupportInitialize(): System_ComponentModel_Internal.ISupportInitialize$instance;
As_IDisposable(): System_Internal.IDisposable$instance;
}
export interface Timer$instance extends System_ComponentModel_Internal.IComponent$instance, System_ComponentModel_Internal.ISupportInitialize$instance {}
export type Timer = Timer$instance & __Timer$views;
export interface TimersDescriptionAttribute$instance extends DescriptionAttribute {
readonly description: string;
}
export const TimersDescriptionAttribute: {
new(description: string): TimersDescriptionAttribute$instance;
};
export type TimersDescriptionAttribute = TimersDescriptionAttribute$instance;