UNPKG

1.5 kBTypeScriptView Raw
1import { ContributionProvider } from '../common/contribution-provider';
2import { FrontendApplicationContribution } from './frontend-application';
3import { MaybePromise } from '../common';
4import { Deferred } from '../common/promise-util';
5import { RequestService } from '@theia/request';
6export interface JsonSchemaConfiguration {
7 fileMatch: string | string[];
8 url: string;
9}
10export interface JsonSchemaRegisterContext {
11 registerSchema(config: JsonSchemaConfiguration): void;
12}
13export declare const JsonSchemaContribution: unique symbol;
14export interface JsonSchemaContribution {
15 registerSchemas(store: JsonSchemaRegisterContext): MaybePromise<void>;
16}
17export declare class JsonSchemaStore implements FrontendApplicationContribution {
18 protected readonly contributions: ContributionProvider<JsonSchemaContribution>;
19 protected readonly _schemas: Deferred<JsonSchemaConfiguration[]>;
20 get schemas(): Promise<JsonSchemaConfiguration[]>;
21 onStart(): void;
22 protected getRegisterTimeout(): number;
23}
24export declare class DefaultJsonSchemaContribution implements JsonSchemaContribution {
25 protected readonly requestService: RequestService;
26 registerSchemas(context: JsonSchemaRegisterContext): Promise<void>;
27}
28export declare namespace DefaultJsonSchemaContribution {
29 interface SchemaData {
30 name: string;
31 description: string;
32 fileMatch?: string[];
33 url: string;
34 schema: any;
35 }
36}
37//# sourceMappingURL=json-schema-store.d.ts.map
\No newline at end of file