import type { Observable } from 'rxjs' ; import type { TypeOf } from '@kbn/config-schema' ; import { schema } from '@kbn/config-schema' ; import type { PluginInitializerContext } from 'src/core/server' ; export const ConfigSchema = schema . object ( { maxSpaces : schema . number ( { defaultValue : 1000 } ) , } ) ; export function createConfig$ ( context ) { return context . config . create < TypeOf < typeof ConfigSchema > > ( ) ; } export type ConfigType = ReturnType < typeof createConfig$ > extends Observable < infer P > ? P : ReturnType < typeof createConfig$ > ;