/
DocumentFilter.hx
30 lines (27 loc) · 1006 Bytes
/
DocumentFilter.hx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package vscode;
/**
* A document filter denotes a document by different properties like
* the {@link TextDocument.languageId language}, the {@link Uri.scheme scheme} of
* its resource, or a glob-pattern that is applied to the {@link TextDocument.fileName path}.
*
* @example <caption>A language filter that applies to typescript files on disk</caption>
* { language: 'typescript', scheme: 'file' }
*
* @example <caption>A language filter that applies to all package.json paths</caption>
* { language: 'json', pattern: '**/package.json' }
*/
typedef DocumentFilter = {
/**
* A language id, like `typescript`.
*/
final ?language:String;
/**
* A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.
*/
final ?scheme:String;
/**
* A {@link GlobPattern glob pattern} that is matched on the absolute path of the document. Use a {@link RelativePattern relative pattern}
* to filter documents to a {@link WorkspaceFolder workspace folder}.
*/
final ?pattern:GlobPattern;
}