Fix missed start -> setup renames (#33967)

This commit is contained in:
Josh Dover 2019-03-27 15:35:16 -05:00 committed by GitHub
parent 07ad8fdbab
commit 049723da8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -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;
};

View file

@ -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() {