How to use the Container function from inversify

Find comprehensive JavaScript inversify.Container code examples handpicked from public code repositorys.

11
12
13
14
15
16
17
18
19
20
21
const { BackendApplication, CliManager } = require('@theia/core/lib/node');
const { backendApplicationModule } = require('@theia/core/lib/node/backend-application-module');
const { messagingBackendModule } = require('@theia/core/lib/node/messaging/messaging-backend-module');
const { loggerBackendModule } = require('@theia/core/lib/node/logger-backend-module');


const container = new Container();
container.load(backendApplicationModule);
container.load(messagingBackendModule);
container.load(loggerBackendModule);

fork icon0
star icon0
watch icon1

+ 137 other calls in file

491
492
493
494
495
496
497
498
499
500
    assert.isTrue(contextKeyService.match('editorTextFocus'));
    assert.isFalse(contextKeyService.match('renameInputVisible'));

    const activeEditor = /** @type {MonacoEditor} */ MonacoEditor.get(editorManager.activeEditor);
    assert.equal(activeEditor.uri.toString(), demoFileUri.toString());
    // const |foo = new Container();
    const { lineNumber, column } = activeEditor.getControl().getPosition();
    assert.deepEqual({ lineNumber, column }, { lineNumber: 26, column: 7 });
    assert.equal(activeEditor.getControl().getModel().getWordAtPosition({ lineNumber: 28, column: 1 }).word, 'foo');
});
fork icon0
star icon0
watch icon289

+ 189 other calls in file