Fix missed start
-> setup
renames (#33967)
This commit is contained in:
parent
07ad8fdbab
commit
049723da8a
2
src/legacy/server/kbn_server.d.ts
vendored
2
src/legacy/server/kbn_server.d.ts
vendored
|
@ -62,7 +62,7 @@ type KbnMixinFunc = (kbnServer: KbnServer, server: Server, config: any) => Promi
|
|||
type Unpromise<T> = T extends Promise<infer U> ? U : T;
|
||||
export default class KbnServer {
|
||||
public readonly newPlatform: {
|
||||
start: {
|
||||
setup: {
|
||||
core: {
|
||||
elasticsearch: ElasticsearchServiceSetup;
|
||||
};
|
||||
|
|
|
@ -38,18 +38,18 @@ interface CoreSetup {
|
|||
}
|
||||
|
||||
const runtimeContext = {
|
||||
start: {
|
||||
setup: {
|
||||
core: null as CoreSetup | null,
|
||||
plugins: {},
|
||||
},
|
||||
};
|
||||
|
||||
export function __newPlatformInit__(core: CoreSetup) {
|
||||
if (runtimeContext.start.core) {
|
||||
if (runtimeContext.setup.core) {
|
||||
throw new Error('New platform core api was already initialized');
|
||||
}
|
||||
|
||||
runtimeContext.start.core = core;
|
||||
runtimeContext.setup.core = core;
|
||||
}
|
||||
|
||||
export function getNewPlatform() {
|
||||
|
|
Loading…
Reference in a new issue