@kkdev92/vscode-ext-kit - v4.1.1
    Preparing search index...

    Interface ExtensionExports<TMap, TApi>

    What an extension publishes to other extensions.

    VS Code reads it off whatever activate resolves to, so it has to be built during activation and after the services it is made of — declaring it lets the framework do both, instead of the extension keeping a mutable module variable and hoping it was filled.

    const app = defineExtension({
    name: 'Sample',
    modules: [sampleModule],
    exports: {
    inject: { index: ProjectIndex },
    create: ({ index }) => ({ count: () => index.count() }),
    },
    });

    // Resolves to { count(): number }
    export const activate = app.activate;
    interface ExtensionExports<TMap extends ServiceMap, TApi> {
        create: (injected: Injected<TMap>) => TApi;
        inject: TMap;
    }

    Type Parameters

    Index
    create: (injected: Injected<TMap>) => TApi
    inject: TMap