@tsonic/dotnet-pure
Version:
TypeScript type definitions for .NET 10 BCL (Base Class Library) - CLR naming
240 lines (160 loc) • 7.52 kB
TypeScript
// Generated by tsbindgen - Architecture
// Namespace: System.Runtime.Versioning
// 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 types from other namespaces
import * as System_Internal from "../../System/internal/index.js";
import type { Attribute, Boolean as ClrBoolean, Enum, IComparable, IConvertible, IEquatable_1, IFormatProvider, IFormattable, Int32, ISpanFormattable, Object as ClrObject, String as ClrString, Type, TypeCode, Version } 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 ComponentGuaranteesOptions {
None = 0,
Exchange = 1,
Stable = 2,
SideBySide = 4
}
export enum ResourceScope {
None = 0,
Machine = 1,
Process = 2,
AppDomain = 4,
Library = 8,
Private = 16,
Assembly = 32
}
export interface ComponentGuaranteesAttribute$instance extends Attribute {
readonly Guarantees: ComponentGuaranteesOptions;
}
export const ComponentGuaranteesAttribute: {
new(guarantees: ComponentGuaranteesOptions): ComponentGuaranteesAttribute$instance;
};
export type ComponentGuaranteesAttribute = ComponentGuaranteesAttribute$instance;
export interface FrameworkName$instance {
readonly FullName: string;
readonly Identifier: string;
readonly Profile: string;
readonly Version: Version;
Equals(obj: unknown): boolean;
Equals(other: FrameworkName): boolean;
GetHashCode(): int;
ToString(): string;
}
export const FrameworkName: {
new(identifier: string, version: Version): FrameworkName$instance;
new(identifier: string, version: Version, profile: string): FrameworkName$instance;
new(frameworkName: string): FrameworkName$instance;
};
export interface __FrameworkName$views {
As_IEquatable_1(): System_Internal.IEquatable_1$instance<FrameworkName>;
// Structural method bridges for numeric interface constraints
Equals(other: FrameworkName): boolean;
}
export type FrameworkName = FrameworkName$instance & __FrameworkName$views;
export interface ObsoletedOSPlatformAttribute$instance extends OSPlatformAttribute {
readonly Message: string;
Url: string;
}
export const ObsoletedOSPlatformAttribute: {
new(platformName: string): ObsoletedOSPlatformAttribute$instance;
new(platformName: string, message: string): ObsoletedOSPlatformAttribute$instance;
};
export type ObsoletedOSPlatformAttribute = ObsoletedOSPlatformAttribute$instance;
export interface OSPlatformAttribute$instance extends Attribute {
readonly PlatformName: string;
}
export const OSPlatformAttribute: {
};
export type OSPlatformAttribute = OSPlatformAttribute$instance;
export interface RequiresPreviewFeaturesAttribute$instance extends Attribute {
readonly Message: string;
Url: string;
}
export const RequiresPreviewFeaturesAttribute: {
new(): RequiresPreviewFeaturesAttribute$instance;
new(message: string): RequiresPreviewFeaturesAttribute$instance;
};
export type RequiresPreviewFeaturesAttribute = RequiresPreviewFeaturesAttribute$instance;
export interface ResourceConsumptionAttribute$instance extends Attribute {
readonly ConsumptionScope: ResourceScope;
readonly ResourceScope: ResourceScope;
}
export const ResourceConsumptionAttribute: {
new(resourceScope: ResourceScope): ResourceConsumptionAttribute$instance;
new(resourceScope: ResourceScope, consumptionScope: ResourceScope): ResourceConsumptionAttribute$instance;
};
export type ResourceConsumptionAttribute = ResourceConsumptionAttribute$instance;
export interface ResourceExposureAttribute$instance extends Attribute {
readonly ResourceExposureLevel: ResourceScope;
}
export const ResourceExposureAttribute: {
new(exposureLevel: ResourceScope): ResourceExposureAttribute$instance;
};
export type ResourceExposureAttribute = ResourceExposureAttribute$instance;
export interface SupportedOSPlatformAttribute$instance extends OSPlatformAttribute {
}
export const SupportedOSPlatformAttribute: {
new(platformName: string): SupportedOSPlatformAttribute$instance;
};
export type SupportedOSPlatformAttribute = SupportedOSPlatformAttribute$instance;
export interface SupportedOSPlatformGuardAttribute$instance extends OSPlatformAttribute {
}
export const SupportedOSPlatformGuardAttribute: {
new(platformName: string): SupportedOSPlatformGuardAttribute$instance;
};
export type SupportedOSPlatformGuardAttribute = SupportedOSPlatformGuardAttribute$instance;
export interface TargetFrameworkAttribute$instance extends Attribute {
FrameworkDisplayName: string;
readonly FrameworkName: string;
}
export const TargetFrameworkAttribute: {
new(frameworkName: string): TargetFrameworkAttribute$instance;
};
export type TargetFrameworkAttribute = TargetFrameworkAttribute$instance;
export interface TargetPlatformAttribute$instance extends OSPlatformAttribute {
}
export const TargetPlatformAttribute: {
new(platformName: string): TargetPlatformAttribute$instance;
};
export type TargetPlatformAttribute = TargetPlatformAttribute$instance;
export interface UnsupportedOSPlatformAttribute$instance extends OSPlatformAttribute {
readonly Message: string;
}
export const UnsupportedOSPlatformAttribute: {
new(platformName: string): UnsupportedOSPlatformAttribute$instance;
new(platformName: string, message: string): UnsupportedOSPlatformAttribute$instance;
};
export type UnsupportedOSPlatformAttribute = UnsupportedOSPlatformAttribute$instance;
export interface UnsupportedOSPlatformGuardAttribute$instance extends OSPlatformAttribute {
}
export const UnsupportedOSPlatformGuardAttribute: {
new(platformName: string): UnsupportedOSPlatformGuardAttribute$instance;
};
export type UnsupportedOSPlatformGuardAttribute = UnsupportedOSPlatformGuardAttribute$instance;
export abstract class VersioningHelper$instance {
static MakeVersionSafeName(name: string, from_: ResourceScope, to: ResourceScope, type_: Type): string;
static MakeVersionSafeName(name: string, from_: ResourceScope, to: ResourceScope): string;
}
export type VersioningHelper = VersioningHelper$instance;