1 | import { ContributionProvider } from '../common/contribution-provider';
|
2 | import { FrontendApplicationContribution } from './frontend-application';
|
3 | import { MaybePromise } from '../common';
|
4 | import { Deferred } from '../common/promise-util';
|
5 | import { RequestService } from '@theia/request';
|
6 | export interface JsonSchemaConfiguration {
|
7 | fileMatch: string | string[];
|
8 | url: string;
|
9 | }
|
10 | export interface JsonSchemaRegisterContext {
|
11 | registerSchema(config: JsonSchemaConfiguration): void;
|
12 | }
|
13 | export declare const JsonSchemaContribution: unique symbol;
|
14 | export interface JsonSchemaContribution {
|
15 | registerSchemas(store: JsonSchemaRegisterContext): MaybePromise<void>;
|
16 | }
|
17 | export 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 | }
|
24 | export declare class DefaultJsonSchemaContribution implements JsonSchemaContribution {
|
25 | protected readonly requestService: RequestService;
|
26 | registerSchemas(context: JsonSchemaRegisterContext): Promise<void>;
|
27 | }
|
28 | export declare namespace DefaultJsonSchemaContribution {
|
29 | interface SchemaData {
|
30 | name: string;
|
31 | description: string;
|
32 | fileMatch?: string[];
|
33 | url: string;
|
34 | schema: any;
|
35 | }
|
36 | }
|
37 |
|
\ | No newline at end of file |