import type { Nullable, NullOr } from "@joookiwi/type"; import type { Enumerable } from "./Enumerable"; import type { EnumerableWithNullableParent } from "./EnumerableWithNullableParent"; import type { NameOf, PossibleNameOf } from "./type/nameOf"; import type { PossibleOrdinalOf } from "./type/ordinalOf"; import type { PossibleEnumerableValueOrNameByValueOrCallback } from "./type/possibleInstance"; import { Enum } from "./Enum"; /** * An {@link Enum} class in conjuncture with the {@link EnumerableWithNullableParent}. * * Compared to its sibling {@link EnumWithParent}, it can receive `null`. * * But it can still throw a {@link NullReferenceException} in different scenarios: * - An exception is thrown when attempting to retrieve its {@link CompanionEnumWithParent} * - An exception is thrown when attempting to retrieve the value by {@link CompanionEnumWithParentDeclaration.getValue getValue()} * * @see EnumWithParent */ export declare abstract class EnumWithNullableParent = PossibleOrdinalOf, const NAME extends PossibleNameOf = PossibleNameOf> extends Enum implements EnumerableWithNullableParent { #private; /** * Create the instance with a {@link EnumerableWithNullableParent.parent parent} reference * having the same {@link Enum.name name} as the current instance */ protected constructor(); /** * Create the instance with a {@link EnumerableWithNullableParent.parent parent} reference * * @param parent The parent reference */ protected constructor(parent: Nullable); /** * Create the instance with a {@link EnumerableWithNullableParent.parent parent} {@link Enumerable.name name} reference * * @param parentName The parent reference retrieved from the {@link Enumerable.name name} value */ protected constructor(parentName: Nullable>); /** * Create the instance with a {@link EnumerableWithNullableParent.parent parent} reference * via a callback * * @param lateParent The late parent reference */ protected constructor(lateParent: Nullable<() => Nullable>); /** * Create the instance with a {@link EnumerableWithNullableParent.parent parent} {@link Enumerable.name name} reference * via a callback * * @param lateParentName The late parent reference retrieved from the {@link Enumerable.name name} value */ protected constructor(lateParentName: Nullable<() => Nullable>>); /** * Create the instance with a parent from any possible values (in Javascript) * * @param parent The parent value (from any possibilities in Javascript) * * @typescriptDefinition */ protected constructor(parent?: PossibleEnumerableValueOrNameByValueOrCallback); /** * The {@link NullOr nullable} parent of the current instance * * @lazy * @throws NullReferenceException An error happened while attempting to retrieve the parent value */ get parent(): NullOr; } //# sourceMappingURL=EnumWithNullableParent.d.ts.map