UNPKG

2.03 kBTypeScriptView Raw
1import { JSONValue } from '@phosphor/coreutils';
2import { IJSONSchema, JsonType } from '../json-schema';
3import { PreferenceScope } from './preference-scope';
4/**
5 * @deprecated since 1.22.0. Import from @theia/core/common/json-schema.ts instead.
6 */
7export { JsonType };
8export interface PreferenceSchema {
9 [name: string]: any;
10 scope?: 'application' | 'window' | 'resource' | PreferenceScope;
11 overridable?: boolean;
12 properties: PreferenceSchemaProperties;
13}
14export declare namespace PreferenceSchema {
15 function is(obj: Object | undefined): obj is PreferenceSchema;
16 function getDefaultScope(schema: PreferenceSchema): PreferenceScope;
17}
18export interface PreferenceSchemaProperties {
19 [name: string]: PreferenceSchemaProperty;
20}
21export declare namespace PreferenceSchemaProperties {
22 function is(obj: Object | undefined): obj is PreferenceSchemaProperties;
23}
24export interface PreferenceDataSchema {
25 [name: string]: any;
26 scope?: PreferenceScope;
27 properties: {
28 [name: string]: PreferenceDataProperty;
29 };
30 patternProperties: {
31 [name: string]: PreferenceDataProperty;
32 };
33}
34export interface PreferenceItem extends IJSONSchema {
35 /**
36 * preference default value, if `undefined` then `default`
37 */
38 defaultValue?: JSONValue;
39 overridable?: boolean;
40 [key: string]: any;
41}
42export interface PreferenceSchemaProperty extends PreferenceItem {
43 description?: string;
44 markdownDescription?: string;
45 scope?: 'application' | 'machine' | 'window' | 'resource' | 'language-overridable' | 'machine-overridable' | PreferenceScope;
46}
47export interface PreferenceDataProperty extends PreferenceItem {
48 description?: string;
49 markdownDescription?: string;
50 scope?: PreferenceScope;
51 typeDetails?: any;
52}
53export declare namespace PreferenceDataProperty {
54 function fromPreferenceSchemaProperty(schemaProps: PreferenceSchemaProperty, defaultScope?: PreferenceScope): PreferenceDataProperty;
55}
56//# sourceMappingURL=preference-schema.d.ts.map
\No newline at end of file