Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal portal type issues #386

Open
renejfc opened this issue Nov 26, 2024 · 0 comments
Open

internal portal type issues #386

renejfc opened this issue Nov 26, 2024 · 0 comments

Comments

@renejfc
Copy link
Contributor

renejfc commented Nov 26, 2024

Description

When importing from internal module portal most of the typings aren't properly inferred.

Details

Here's the code from dist/core/portal.d.ts, most of these getters except moduleKeys resolve as any instead of the type defined.

declare class Portal {
    private _enabledModules;
    private _modules;
    constructor();
    get apis(): Collection<string, HandlerRecord<Api>>;
    get commands(): Collection<string, HandlerRecord<Command>>;
    get context(): Collection<string, HandlerRecord<Context>>;
    get events(): Collection<string, HandlerRecord<globalThis.Event>[]>;
    get middleware(): HandlerRecord<Middleware>[];
    get moduleKeys(): Set<string>;
    module(moduleName: string): Module;
    /**
     * Populates the Portal instance from the manifest file.
     *
     * Warning: Do not call this method directly. Use the `portal` export instead.
     */
    static open(): Promise<void>;
}

Reproduction

Go to any robo project and try to access to any property from these getters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant