nyx Typedoc
    Preparing search index...

    Interface ReadonlyCommandRepository<Types>

    Type of immutable CommandRepository.

    interface ReadonlyCommandRepository<
        Types extends InteractionTypes = InteractionTypes,
    > {
        return?: (
            value?: any,
        ) => IteratorResult<[string, TopLevelCommand<Types>], any>;
        size: number;
        throw?: (e?: any) => IteratorResult<[string, TopLevelCommand<Types>], any>;
        "[iterator]"(): IterableIterator<
            [string, TopLevelCommand<Types>],
            any,
            any,
        >;
        entries(): IterableIterator<[string, TopLevelCommand<Types>]>;
        getCommandByName(id: string): TopLevelCommand<Types> | null;
        getCommands(): ReadonlyCollection<string, TopLevelCommand<Types>>;
        isCommandId(id: string): boolean;
        isCommandInstance(instance: TopLevelCommand<Types>): boolean;
        keys(): IterableIterator<string>;
        locateByClassTree<T extends ImplementsSubCommandGroup<Types>>(
            ParentCommandClass: ImplementsParentCommand<Types>,
            SubCommandGroupClass: T,
        ): InstanceType<T> | null;
        locateByClassTree<T extends ImplementsSubCommand<Types>>(
            ParentCommandClass: ImplementsParentCommand<Types>,
            SubCommandGroupClass: ImplementsSubCommandGroup<Types>,
            SubCommandClass: T,
        ): InstanceType<T> | null;
        locateByClassTree<T extends ImplementsSubCommand<Types>>(
            ParentCommandClass: ImplementsParentCommand<Types>,
            SubCommandClass: T,
        ): InstanceType<T> | null;
        locateByClassTree<T extends ImplementsParentCommand<Types>>(
            ParentCommandClass: T,
        ): InstanceType<T> | null;
        locateByClassTree<T extends ImplementsStandaloneCommand<Types>>(
            StandaloneCommandClass: T,
        ): InstanceType<T> | null;
        locateByClassTree<T extends ClassImplements<Command<Nameable, Types>>>(
            TopLevelCommandClass: ClassImplements<TopLevelCommand<Types>>,
            FirstChildClass?:
                | ImplementsSubCommandGroup<Types>
                | ImplementsSubCommand<Types>,
            SecondChildClass?: ImplementsSubCommand<Types>,
        ): InstanceType<T> | null;
        locateByNameTree(name: string): TopLevelCommand<Types> | null;
        locateByNameTree(
            parent: string,
            child: string,
        ): SubCommand<Types> | SubCommandGroup<Types> | null;
        locateByNameTree(
            parent: string,
            group: string,
            subCommand: string,
        ): SubCommand<Types> | null;
        locateByNameTree(
            parent: string,
            firstChild?: string,
            secondChild?: string,
        ):
            | TopLevelCommand<Types>
            | SubCommand<Types>
            | SubCommandGroup<Types>
            | null;
        next(
            ...__namedParameters: [] | [any],
        ): IteratorResult<[string, TopLevelCommand<Types>], any>;
        values(): IterableIterator<TopLevelCommand<Types>>;
    }

    Type Parameters

    Hierarchy

    Index
    return?: (value?: any) => IteratorResult<[string, TopLevelCommand<Types>], any>
    size: number

    Returns the number of stored commands.

    throw?: (e?: any) => IteratorResult<[string, TopLevelCommand<Types>], any>
    • Returns IterableIterator<[string, TopLevelCommand<Types>], any, any>

    • Parameters

      • ...__namedParameters: [] | [any]

      Returns IteratorResult<[string, TopLevelCommand<Types>], any>