UNPKG

@finos/legend-application

Version:
40 lines 1.77 kB
/** * Copyright (c) 2020-present, Goldman Sachs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import type { GenericLegendApplicationStore } from './ApplicationStore.js'; type SettingValue = object | string | number | boolean; type SettingConfigurationEntryData = { defaultValue: SettingValue; }; export type SettingOverrideConfigData = Record<string, SettingValue>; export type SettingConfigurationEntry = { key: string; defaultValue: SettingValue; }; export type SettingConfigurationData = Record<string, SettingConfigurationEntryData>; export declare const collectSettingConfigurationEntriesFromConfig: (data: SettingConfigurationData) => SettingConfigurationEntry[]; export declare class SettingService { readonly applicationStore: GenericLegendApplicationStore; private readonly storage; private readonly registry; constructor(applicationStore: GenericLegendApplicationStore); getNumericValue(key: string): number | undefined; getStringValue(key: string): string | undefined; getBooleanValue(key: string): boolean | undefined; getObjectValue(key: string): object | undefined; persistValue(key: string, value: SettingValue | undefined): void; } export {}; //# sourceMappingURL=SettingService.d.ts.map