import type { Nullable, NullOrUndefined } from "@joookiwi/type"; import type { Enumerable } from "../Enumerable"; import type { EnumerableConstructor } from "../EnumerableConstructor"; import type { CompanionEnumerableType } from "../type/companion"; import type { CompanionEnumFromEnumerableConstructorOrCompanionEnum } from "../type/companionFrom"; import type { CompanionOf } from "../type/companionOf"; import type { PossibleEnumerableInstance } from "../type/possibleInstance"; /** * Get nothing because of a `null` instance * * @param instance The `null` instance * @throws NullInstanceException The {@link instance} is `null` or `undefined` */ export declare function getCompanion(instance: NullOrUndefined): never; /** * Get the {@link CompanionEnumerable} instance directly * * @param companion The {@link CompanionEnumerable} instance * @throws NullInstanceException The {@link instance} is `null` or `undefined` */ export declare function getCompanion = CompanionEnumerableType>(companion: Nullable): COMPANION_ENUM; /** * Get a {@link CompanionEnumerable} instance from an {@link Enumerable} class. * And if in the {@link CompanionEnumerable} values or class type, there is no valid value, then exception can be thrown. * * @param constructorClass The {@link EnumerableConstructor} class to retrieve the {@link CompanionEnumerable} via `constructorClass.CompanionEnum.get` * @throws NullInstanceException The {@link instance} is `null` or `undefined` * @throws InvalidInstanceException The {@link instance} or the `instance.CompanionEnum` if not a {@link Function} type * @throws NonExistantKeyException The {@link instance} has not the `CompanionEnum` key or the `instance.CompanionEnum` does not have the `get` key * @throws NullReferenceException The {@link instance}`.CompanionEnum` or {@link instance}.`CompanionEnum.get` has `null`|`undefined` being retrieved */ export declare function getCompanion> = EnumerableConstructor>>(constructorClass: Nullable): CompanionOf; /** * Get the {@link CompanionEnumerable} from any values ({@link EnumerableConstructor} or {@link CompanionEnumerable}) * * @param instance The {@link EnumerableConstructor} to retrieve via `instance.CompanionEnum.get` or {@link CompanionEnumerable} directly * @throws NullInstanceException The {@link instance} is `null` or `undefined` * @throws InvalidInstanceException The {@link instance} or the `instance.CompanionEnum` if not a {@link Function} type * @throws NonExistantKeyException The {@link instance} has not the `CompanionEnum` key or the `instance.CompanionEnum` does not have the `get` key * @throws NullReferenceException The {@link instance}`.CompanionEnum` or {@link instance}.`CompanionEnum.get` has `null`|`undefined` being retrieved * @typescriptDefinition */ export declare function getCompanion>(instance: Nullable): CompanionEnumFromEnumerableConstructorOrCompanionEnum; //# sourceMappingURL=getCompanion.d.ts.map