import type { Nullable, NullOrUndefined } from "@joookiwi/type"; import type { Enumerable } from "../Enumerable"; import type { EnumerableWithNullableGrandParent } from "../EnumerableWithNullableGrandParent"; import type { EnumerableWithNullableGreatGrandParent } from "../EnumerableWithNullableGreatGrandParent"; import type { EnumerableWithNullableParent } from "../EnumerableWithNullableParent"; import type { EnumerableConstructor } from "../EnumerableConstructor"; import type { CompanionEnumerableType, CompanionEnumerableWithGrandParentType, CompanionEnumerableWithGreatGrandParentType, CompanionEnumerableWithParentType } from "../type/companion"; import type { EnumerableWithNullableGrandParentGeneralType, EnumerableWithNullableGreatGrandParentGeneralType, EnumerableWithNullableParentGeneralType } from "../type/general"; /** * Get nothing because of a `null` instance * * @param instance The `null` instance * @throws NullReferenceException The instance was `null` or `undefined` */ export declare function getLastPrototype(instance: NullOrUndefined): never; /** * Get the last {@link ObjectConstructor.prototype prototype} * until it is the constructor types in {@link KnownEnumConstructors} in the case of an {@link Enum} * and the last proper {@link Enumerable}-like on a {@link Enumerable} instance * * @param instance The instance (by default as the current instance) * @throws NullReferenceException The instance was `null` or `undefined` * @throws NullReferenceException No {@link Enum} constructor from the instance could be found (if it was a {@link Enum}) * @throws NullReferenceException No {@link Enumerable} constructor from the instance could be found (if it was a {@link Enumerable}) * @throws InvalidInstanceException No prototype could be found since it did not have the {@link Enumerable} structure * @see https://stackoverflow.com/a/68323749 * @note No proper type inference can be made since it is possible to have a different prototype than the closest one (`instance.constructor`) */ export declare function getLastPrototype(instance: Nullable): EnumerableConstructor>; /** * Get the last {@link ObjectConstructor.prototype prototype} * until it is the constructor types in {@link KnownEnumConstructors} in the case of an {@link Enum} * and the last proper {@link Enumerable}-like on a {@link Enumerable} instance * * @param instance The instance (by default as the current instance) * @throws NullReferenceException The instance was `null` or `undefined` * @throws NullReferenceException No {@link Enum} constructor from the instance could be found (if it was a {@link Enum}) * @throws NullReferenceException No {@link Enumerable} constructor from the instance could be found (if it was a {@link Enumerable}) * @throws InvalidInstanceException No prototype could be found since it did not have the {@link Enumerable} structure * @see https://stackoverflow.com/a/68323749 * @note No proper type inference can be made since it is possible to have a different prototype than the closest one (`instance.constructor`) */ export declare function getLastPrototype, const PARENT extends EnumerableWithNullableGrandParentGeneralType>(instance: Nullable): EnumerableConstructor>; /** * Get the last {@link ObjectConstructor.prototype prototype} * until it is the constructor types in {@link KnownEnumConstructors} in the case of an {@link Enum} * and the last proper {@link Enumerable}-like on a {@link Enumerable} instance * * @param instance The instance (by default as the current instance) * @throws NullReferenceException The instance was `null` or `undefined` * @throws NullReferenceException No {@link Enum} constructor from the instance could be found (if it was a {@link Enum}) * @throws NullReferenceException No {@link Enumerable} constructor from the instance could be found (if it was a {@link Enumerable}) * @throws InvalidInstanceException No prototype could be found since it did not have the {@link Enumerable} structure * @see https://stackoverflow.com/a/68323749 * @note No proper type inference can be made since it is possible to have a different prototype than the closest one (`instance.constructor`) */ export declare function getLastPrototype, const PARENT extends EnumerableWithNullableGrandParent, const GRAND_PARENT extends EnumerableWithNullableParentGeneralType>(instance: Nullable): EnumerableConstructor>; /** * Get the last {@link ObjectConstructor.prototype prototype} * until it is the constructor types in {@link KnownEnumConstructors} in the case of an {@link Enum} * and the last proper {@link Enumerable}-like on a {@link Enumerable} instance * * @param instance The instance (by default as the current instance) * @throws NullReferenceException The instance was `null` or `undefined` * @throws NullReferenceException No {@link Enum} constructor from the instance could be found (if it was a {@link Enum}) * @throws NullReferenceException No {@link Enumerable} constructor from the instance could be found (if it was a {@link Enumerable}) * @throws InvalidInstanceException No prototype could be found since it did not have the {@link Enumerable} structure * @see https://stackoverflow.com/a/68323749 * @note No proper type inference can be made since it is possible to have a different prototype than the closest one (`instance.constructor`) */ export declare function getLastPrototype, const PARENT extends EnumerableWithNullableGrandParent, const GRAND_PARENT extends EnumerableWithNullableParent, const GREAT_GRAND_PARENT extends Enumerable>(instance: Nullable): EnumerableConstructor>; /** * Get the last {@link ObjectConstructor.prototype prototype} * until it is the constructor types in {@link KnownEnumConstructors} in the case of an {@link Enum} * and the last proper {@link Enumerable}-like on a {@link Enumerable} instance * * @param instance The instance (by default as the current instance) * @throws NullReferenceException The instance was `null` or `undefined` * @throws NullReferenceException No {@link Enum} constructor from the instance could be found (if it was a {@link Enum}) * @throws NullReferenceException No {@link Enumerable} constructor from the instance could be found (if it was a {@link Enumerable}) * @throws InvalidInstanceException No prototype could be found since it did not have the {@link Enumerable} structure * @see https://stackoverflow.com/a/68323749 * @note No proper type inference can be made since it is possible to have a different prototype than the closest one (`instance.constructor`) */ export declare function getLastPrototype(instance: Nullable): EnumerableConstructor>; /** * Get the last {@link ObjectConstructor.prototype prototype} * until it is the constructor types in {@link KnownEnumConstructors} in the case of an {@link Enum} * and the last proper {@link Enumerable}-like on a {@link Enumerable} instance * * @param instance The instance (by default as the current instance) * @throws NullReferenceException The instance was `null` or `undefined` * @throws NullReferenceException No {@link Enum} constructor from the instance could be found (if it was a {@link Enum}) * @throws NullReferenceException No {@link Enumerable} constructor from the instance could be found (if it was a {@link Enumerable}) * @throws InvalidInstanceException No prototype could be found since it did not have the {@link Enumerable} structure * @see https://stackoverflow.com/a/68323749 * @note No proper type inference can be made since it is possible to have a different prototype than the closest one (`instance.constructor`) */ export declare function getLastPrototype, const PARENT extends EnumerableWithNullableParentGeneralType>(instance: Nullable): EnumerableConstructor>; /** * Get the last {@link ObjectConstructor.prototype prototype} * until it is the constructor types in {@link KnownEnumConstructors} in the case of an {@link Enum} * and the last proper {@link Enumerable}-like on a {@link Enumerable} instance * * @param instance The instance (by default as the current instance) * @throws NullReferenceException The instance was `null` or `undefined` * @throws NullReferenceException No {@link Enum} constructor from the instance could be found (if it was a {@link Enum}) * @throws NullReferenceException No {@link Enumerable} constructor from the instance could be found (if it was a {@link Enumerable}) * @throws InvalidInstanceException No prototype could be found since it did not have the {@link Enumerable} structure * @see https://stackoverflow.com/a/68323749 * @note No proper type inference can be made since it is possible to have a different prototype than the closest one (`instance.constructor`) */ export declare function getLastPrototype, const PARENT extends EnumerableWithNullableParent, GRAND_PARENT extends Enumerable>(instance: Nullable): EnumerableConstructor>; /** * Get the last {@link ObjectConstructor.prototype prototype} * until it is the constructor types in {@link KnownEnumConstructors} in the case of an {@link Enum} * and the last proper {@link Enumerable}-like on a {@link Enumerable} instance * * @param instance The instance (by default as the current instance) * @throws NullReferenceException The instance was `null` or `undefined` * @throws NullReferenceException No {@link Enum} constructor from the instance could be found (if it was a {@link Enum}) * @throws NullReferenceException No {@link Enumerable} constructor from the instance could be found (if it was a {@link Enumerable}) * @throws InvalidInstanceException No prototype could be found since it did not have the {@link Enumerable} structure * @see https://stackoverflow.com/a/68323749 * @note No proper type inference can be made since it is possible to have a different prototype than the closest one (`instance.constructor`) */ export declare function getLastPrototype(instance: Nullable): EnumerableConstructor>; /** * Get the last {@link ObjectConstructor.prototype prototype} * until it is the constructor types in {@link KnownEnumConstructors} in the case of an {@link Enum} * and the last proper {@link Enumerable}-like on a {@link Enumerable} instance * * @param instance The instance (by default as the current instance) * @throws NullReferenceException The instance was `null` or `undefined` * @throws NullReferenceException No {@link Enum} constructor from the instance could be found (if it was a {@link Enum}) * @throws NullReferenceException No {@link Enumerable} constructor from the instance could be found (if it was a {@link Enumerable}) * @throws InvalidInstanceException No prototype could be found since it did not have the {@link Enumerable} structure * @see https://stackoverflow.com/a/68323749 * @note No proper type inference can be made since it is possible to have a different prototype than the closest one (`instance.constructor`) */ export declare function getLastPrototype, const PARENT extends Enumerable>(instance: Nullable): EnumerableConstructor>; /** * Get the last {@link ObjectConstructor.prototype prototype} * until it is the constructor types in {@link KnownEnumConstructors} in the case of an {@link Enum} * and the last proper {@link Enumerable}-like on a {@link Enumerable} instance * * @param instance The instance (by default as the current instance) * @throws NullReferenceException The instance was `null` or `undefined` * @throws NullReferenceException No {@link Enum} constructor from the instance could be found (if it was a {@link Enum}) * @throws NullReferenceException No {@link Enumerable} constructor from the instance could be found (if it was a {@link Enumerable}) * @throws InvalidInstanceException No prototype could be found since it did not have the {@link Enumerable} structure * @see https://stackoverflow.com/a/68323749 * @note No proper type inference can be made since it is possible to have a different prototype than the closest one (`instance.constructor`) */ export declare function getLastPrototype(instance: Nullable): EnumerableConstructor>; //# sourceMappingURL=getLastPrototype.d.ts.map