UNPKG

@theia/core

Version:

Theia is a cloud & desktop IDE framework implemented in TypeScript.

62 lines 2.31 kB
import { JSONValue } from '@lumino/coreutils'; import { IJSONSchema } from '../json-schema'; import { PreferenceScope } from './preference-scope'; export interface PreferenceSchema { [name: string]: any; scope?: 'application' | 'window' | 'resource' | PreferenceScope; overridable?: boolean; /** * The title of the preference schema. * It is used in the preference UI to associate a localized group of preferences. */ title?: string; properties: PreferenceSchemaProperties; } export declare namespace PreferenceSchema { function is(obj: unknown): obj is PreferenceSchema; function getDefaultScope(schema: PreferenceSchema): PreferenceScope; } export interface PreferenceSchemaProperties { [name: string]: PreferenceSchemaProperty; } export declare namespace PreferenceSchemaProperties { function is(obj: unknown): obj is PreferenceSchemaProperties; } export interface PreferenceDataSchema { [name: string]: any; scope?: PreferenceScope; properties: { [name: string]: PreferenceDataProperty; }; patternProperties: { [name: string]: PreferenceDataProperty; }; } export interface PreferenceItem extends IJSONSchema { /** * preference default value, if `undefined` then `default` */ defaultValue?: JSONValue; overridable?: boolean; /** If false, the preference will not be included in the schema or the UI. */ included?: boolean; /** If true, this item will registered as part of the preference schema, but hidden in the preference editor UI. */ hidden?: boolean; [key: string]: any; } export interface PreferenceSchemaProperty extends PreferenceItem { description?: string; markdownDescription?: string; scope?: 'application' | 'machine' | 'window' | 'resource' | 'language-overridable' | 'machine-overridable' | PreferenceScope; tags?: string[]; } export interface PreferenceDataProperty extends PreferenceItem { description?: string; markdownDescription?: string; scope?: PreferenceScope; typeDetails?: any; } export declare namespace PreferenceDataProperty { function fromPreferenceSchemaProperty(schemaProps: PreferenceSchemaProperty, defaultScope?: PreferenceScope): PreferenceDataProperty; } //# sourceMappingURL=preference-schema.d.ts.map