提交 d56e2501 编写于 作者: J Johannes Rieken

use backslash when writing pattern samples inside jsdoc, fixes #38464

上级 08767f86
......@@ -1714,13 +1714,13 @@ declare module 'vscode' {
/**
* A file glob pattern to match file paths against. This can either be a glob pattern string
* (like `***.{ts,js}` or `*.{ts,js}`) or a [relative pattern](#RelativePattern).
* (like `**\*.{ts,js}` or `*.{ts,js}`) or a [relative pattern](#RelativePattern).
*
* Glob patterns can have the following syntax:
* * `*` to match one or more characters in a path segment
* * `?` to match on one character in a path segment
* * `**` to match any number of path segments, including none
* * `{}` to group conditions (e.g. `***.{ts,js}` matches all TypeScript and JavaScript files)
* * `{}` to group conditions (e.g. `**\*.{ts,js}` matches all TypeScript and JavaScript files)
* * `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
* * `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)
*/
......@@ -1732,7 +1732,7 @@ declare module 'vscode' {
* its resource, or a glob-pattern that is applied to the [path](#TextDocument.fileName).
*
* @sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }`
* @sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }`
* @sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**\package.json' }`
*/
export interface DocumentFilter {
......@@ -1758,7 +1758,7 @@ declare module 'vscode' {
* and [language filters](#DocumentFilter).
*
* @sample `let sel:DocumentSelector = 'typescript'`;
* @sample `let sel:DocumentSelector = ['typescript', { language: 'json', pattern: '**tsconfig.json' }]`;
* @sample `let sel:DocumentSelector = ['typescript', { language: 'json', pattern: '**\tsconfig.json' }]`;
*/
export type DocumentSelector = string | DocumentFilter | (string | DocumentFilter)[];
......@@ -5261,7 +5261,7 @@ declare module 'vscode' {
/**
* Find files across all [workspace folders](#workspace.workspaceFolders) in the workspace.
*
* @sample `findFiles('**∕*.js', '**∕node_modules∕**', 10)`
* @sample `findFiles('**\*.js', '**\node_modules\**', 10)`
* @param include A [glob pattern](#GlobPattern) that defines the files to search for. The glob pattern
* will be matched against the file paths of resulting matches relative to their workspace. Use a [relative pattern](#RelativePattern)
* to restrict the search results to a [workspace folder](#WorkspaceFolder).
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册