Skip to content

Conversation

@mickmister
Copy link
Member

In order to make the initialization process more explicit, and facilitate dependency injection more easily, we are pivoting to explicit registering of modules instead of implicit registering through side effect imports.

import {Springboard} from 'springboard/engine/engine';
import {springboard} from 'springboard/engine/register';

const mod = springboard.defineModule('Main', {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should then be able to do the following, even though it wouldn't make sense for a Main module:

declare module 'springboard' {
    interface DefinedModules {
        Main: typeof mod;
    }
}

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