import { Constructor } from './Constructor.js'; /** * Extract the instance type from a constructor or instance of a class. * * @template T The constructor type or instance type. * @example * // Given a constructor type, extract the instance type. * type Result = MaybeInstance // Set * * // Given an instance type, extract the instance type. * type Result = MaybeInstance> // Set */ type MaybeInstance = T extends Constructor ? C : T; export type { MaybeInstance };