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

fix(api): revert removing index import for api plugin register file #680

Merged

Conversation

MrBazlow
Copy link
Contributor

@MrBazlow MrBazlow commented Jan 2, 2025

Somehow the index import with the merged types for the api plugin ended up decoupled from the plugin register file; without it, the client constructor will not take any configuration settings for the api plugin and the container will not have the server object. This PR restores the import to the same state as the other plugins in the repo.

The current workaround is to import both the index and register file to get the ambient declarations to be detected by TypeScript again which seems unintentional.

// One of these is not like the others...
import '@sapphire/plugin-api/register';
import '@sapphire/plugin-api';
import '@sapphire/plugin-logger/register';
import '@sapphire/plugin-i18next/register';

This appears to be a small change that reverted a reverted commit but which broke the ambient
declaration merging of the api plugin. This change restores the api plugin to be consistent with the
various other plugins and to properly export the merged types again
@favna favna merged commit 19c2b86 into sapphiredev:main Jan 2, 2025
7 checks passed
@MrBazlow MrBazlow deleted the fix/api/restore-register-merged-types branch January 2, 2025 15:38
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

Successfully merging this pull request may close these issues.

2 participants