809 B34 lines
Blame
1/**
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8export type TextMateGrammar = {
9 type: 'json' | 'plist';
10 /**
11 * Grammar data as a string because parseRawGrammar() in vscode-textmate
12 * takes the contents as a string, even if the type is json.
13 */
14 grammar: string;
15};
16
17export type Grammar = {
18 language?: string;
19 injections: Array<string>;
20 embeddedLanguages?: {[scopeName: string]: string};
21 fileName: string;
22 fileFormat: 'json' | 'plist';
23};
24
25export type LanguageConfiguration = {
26 id: string;
27 extensions?: string[];
28 filenames?: string[];
29 filenamePatterns?: string[];
30 firstLine?: string;
31 aliases?: string[];
32 mimetypes?: string[];
33};
34