addons/shared/textmate-lib/types.tsblame
View source
b69ab311/**
b69ab312 * Copyright (c) Meta Platforms, Inc. and affiliates.
b69ab313 *
b69ab314 * This source code is licensed under the MIT license found in the
b69ab315 * LICENSE file in the root directory of this source tree.
b69ab316 */
b69ab317
b69ab318export type TextMateGrammar = {
b69ab319 type: 'json' | 'plist';
b69ab3110 /**
b69ab3111 * Grammar data as a string because parseRawGrammar() in vscode-textmate
b69ab3112 * takes the contents as a string, even if the type is json.
b69ab3113 */
b69ab3114 grammar: string;
b69ab3115};
b69ab3116
b69ab3117export type Grammar = {
b69ab3118 language?: string;
b69ab3119 injections: Array<string>;
b69ab3120 embeddedLanguages?: {[scopeName: string]: string};
b69ab3121 fileName: string;
b69ab3122 fileFormat: 'json' | 'plist';
b69ab3123};
b69ab3124
b69ab3125export type LanguageConfiguration = {
b69ab3126 id: string;
b69ab3127 extensions?: string[];
b69ab3128 filenames?: string[];
b69ab3129 filenamePatterns?: string[];
b69ab3130 firstLine?: string;
b69ab3131 aliases?: string[];
b69ab3132 mimetypes?: string[];
b69ab3133};