Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface DocumentFilter

A document filter denotes a document by different properties like the language, the scheme of its resource, or a glob-pattern that is applied to the path.

example
A language filter that applies to typescript files on disk { language: 'typescript', scheme: 'file' }
example
A language filter that applies to all package.json paths { language: 'json', pattern: '**​/package.json' }

Hierarchy

  • DocumentFilter

Index

Properties(4)

Properties(4)

Optional Readonly language

language: string

A language id, like typescript.

Optional Readonly notebookType

notebookType: string

The type of a notebook, like jupyter-notebook. This allows to narrow down on the type of a notebook that a cell document belongs to.

Note that setting the notebookType-property changes how scheme and pattern are interpreted. When set they are evaluated against the notebook uri, not the document uri.

example
Match python document inside jupyter notebook that aren't stored yet (`untitled`) { language: 'python', notebookType: 'jupyter-notebook', scheme: 'untitled' }

Optional Readonly scheme

scheme: string

A Uri scheme, like file or untitled.

Optional Readonly pattern

pattern: GlobPattern

A glob pattern that is matched on the absolute path of the document. Use a relative pattern to filter documents to a workspace folder.

Generated by TypeDoc. Maintained by 紫升

Links: 搜外友链, 69中文网