UNPKG

2.05 kBTypeScriptView Raw
1import { PreferenceSchemaProperties } from '../../common/preferences/preference-schema';
2export interface OverridePreferenceName {
3 preferenceName: string;
4 overrideIdentifier: string;
5}
6export declare namespace OverridePreferenceName {
7 function is(arg: unknown): arg is OverridePreferenceName;
8}
9export declare const OVERRIDE_PROPERTY_PATTERN: RegExp;
10export declare const getOverridePattern: (identifier: string) => string;
11export declare class PreferenceLanguageOverrideService {
12 protected readonly overrideIdentifiers: Set<string>;
13 testOverrideValue(name: string, value: unknown): value is PreferenceSchemaProperties;
14 /**
15 * @param overrideIdentifier the language id associated for a language override, e.g. `typescript`
16 * @returns the form used to mark language overrides in preference files, e.g. `[typescript]`
17 */
18 markLanguageOverride(overrideIdentifier: string): string;
19 /**
20 * @returns the flat JSON path to an overridden preference, e.g. [typescript].editor.tabSize.
21 */
22 overridePreferenceName({ preferenceName, overrideIdentifier }: OverridePreferenceName): string;
23 /**
24 * @returns an OverridePreferenceName if the `name` contains a language override, e.g. [typescript].editor.tabSize.
25 */
26 overriddenPreferenceName(name: string): OverridePreferenceName | undefined;
27 computeOverridePatternPropertiesKey(): string | undefined;
28 getOverridePreferenceNames(preferenceName: string): IterableIterator<string>;
29 /**
30 * @param overrideIdentifier
31 * @returns true if the addition caused a change, i.e. if the identifier was not already present in the set of identifiers, false otherwise.
32 */
33 addOverrideIdentifier(overrideIdentifier: string): boolean;
34 /**
35 * @param overrideIdentifier
36 * @returns true if the deletion caused a change, i.e. if the identifier was present in the set, false otherwise.
37 */
38 removeOverrideIdentifier(overrideIdentifier: string): boolean;
39}
40//# sourceMappingURL=preference-language-override-service.d.ts.map
\No newline at end of file