@@ -2275,6 +2275,18 @@ declare module 'vscode' {
22752275 */
22762276 static readonly RefactorInline: CodeActionKind;
22772277
2278+ /**
2279+ * Base kind for refactoring move actions: `refactor.move`
2280+ *
2281+ * Example move actions:
2282+ *
2283+ * - Move a function to a new file
2284+ * - Move a property between classes
2285+ * - Move method to base class
2286+ * - ...
2287+ */
2288+ static readonly RefactorMove: CodeActionKind;
2289+
22782290 /**
22792291 * Base kind for refactoring rewrite actions: `refactor.rewrite`
22802292 *
@@ -2284,7 +2296,6 @@ declare module 'vscode' {
22842296 * - Add or remove parameter
22852297 * - Encapsulate field
22862298 * - Make method static
2287- * - Move method to base class
22882299 * - ...
22892300 */
22902301 static readonly RefactorRewrite: CodeActionKind;
@@ -3426,6 +3437,54 @@ declare module 'vscode' {
34263437 constructor(range: Range, newText: string);
34273438 }
34283439
3440+ /**
3441+ * A snippet edit represents an interactive edit that is performed by
3442+ * the editor.
3443+ *
3444+ * *Note* that a snippet edit can always be performed as a normal {@link TextEdit text edit}.
3445+ * This will happen when no matching editor is open or when a {@link WorkspaceEdit workspace edit}
3446+ * contains snippet edits for multiple files. In that case only those that match the active editor
3447+ * will be performed as snippet edits and the others as normal text edits.
3448+ */
3449+ export class SnippetTextEdit {
3450+
3451+ /**
3452+ * Utility to create a replace snippet edit.
3453+ *
3454+ * @param range A range.
3455+ * @param snippet A snippet string.
3456+ * @return A new snippet edit object.
3457+ */
3458+ static replace(range: Range, snippet: SnippetString): SnippetTextEdit;
3459+
3460+ /**
3461+ * Utility to create an insert snippet edit.
3462+ *
3463+ * @param position A position, will become an empty range.
3464+ * @param snippet A snippet string.
3465+ * @return A new snippet edit object.
3466+ */
3467+ static insert(position: Position, snippet: SnippetString): SnippetTextEdit;
3468+
3469+ /**
3470+ * The range this edit applies to.
3471+ */
3472+ range: Range;
3473+
3474+ /**
3475+ * The {@link SnippetString snippet} this edit will perform.
3476+ */
3477+ snippet: SnippetString;
3478+
3479+ /**
3480+ * Create a new snippet edit.
3481+ *
3482+ * @param range A range.
3483+ * @param snippet A snippet string.
3484+ */
3485+ constructor(range: Range, snippet: SnippetString);
3486+ }
3487+
34293488 /**
34303489 * A notebook edit represents edits that should be applied to the contents of a notebook.
34313490 */
@@ -3571,12 +3630,36 @@ declare module 'vscode' {
35713630 has(uri: Uri): boolean;
35723631
35733632 /**
3574- * Set (and replace) text edits for a resource.
3633+ * Set (and replace) notebook edits for a resource.
3634+ *
3635+ * @param uri A resource identifier.
3636+ * @param edits An array of edits.
3637+ */
3638+ set(uri: Uri, edits: NotebookEdit[]): void;
3639+
3640+ /**
3641+ * Set (and replace) notebook edits with metadata for a resource.
35753642 *
35763643 * @param uri A resource identifier.
35773644 * @param edits An array of edits.
35783645 */
3579- set(uri: Uri, edits: TextEdit[] | NotebookEdit[]): void;
3646+ set(uri: Uri, edits: [NotebookEdit, WorkspaceEditEntryMetadata][]): void;
3647+
3648+ /**
3649+ * Set (and replace) text edits or snippet edits for a resource.
3650+ *
3651+ * @param uri A resource identifier.
3652+ * @param edits An array of edits.
3653+ */
3654+ set(uri: Uri, edits: (TextEdit | SnippetTextEdit)[]): void;
3655+
3656+ /**
3657+ * Set (and replace) text edits or snippet edits with metadata for a resource.
3658+ *
3659+ * @param uri A resource identifier.
3660+ * @param edits An array of edits.
3661+ */
3662+ set(uri: Uri, edits: [TextEdit | SnippetTextEdit, WorkspaceEditEntryMetadata][]): void;
35803663
35813664 /**
35823665 * Get the text edits for a resource.
@@ -3589,14 +3672,15 @@ declare module 'vscode' {
35893672 /**
35903673 * Create a regular file.
35913674 *
3592- * @param uri Uri of the new file..
3675+ * @param uri Uri of the new file.
35933676 * @param options Defines if an existing file should be overwritten or be
3594- * ignored. When overwrite and ignoreIfExists are both set overwrite wins.
3677+ * ignored. When ` overwrite` and ` ignoreIfExists` are both set ` overwrite` wins.
35953678 * When both are unset and when the file already exists then the edit cannot
3596- * be applied successfully.
3679+ * be applied successfully. The `content`-property allows to set the initial contents
3680+ * the file is being created with.
35973681 * @param metadata Optional metadata for the entry.
35983682 */
3599- createFile(uri: Uri, options?: { overwrite?: boolean; ignoreIfExists?: boolean }, metadata?: WorkspaceEditEntryMetadata): void;
3683+ createFile(uri: Uri, options?: { overwrite?: boolean; ignoreIfExists?: boolean; contents?: Uint8Array }, metadata?: WorkspaceEditEntryMetadata): void;
36003684
36013685 /**
36023686 * Delete a file or folder.
@@ -10642,7 +10726,7 @@ declare module 'vscode' {
1064210726 * Whether the terminal process environment should be exactly as provided in
1064310727 * `TerminalOptions.env`. When this is false (default), the environment will be based on the
1064410728 * window's environment and also apply configured platform settings like
10645- * `terminal.integrated.windows. env` on top. When this is true, the complete environment
10729+ * `terminal.integrated.env.windows ` on top. When this is true, the complete environment
1064610730 * must be provided as nothing will be inherited from the process or any configuration.
1064710731 */
1064810732 strictEnv?: boolean;
@@ -13219,7 +13303,7 @@ declare module 'vscode' {
1321913303 export interface NotebookDocumentCellChange {
1322013304
1322113305 /**
13222- * The affected notebook .
13306+ * The affected cell .
1322313307 */
1322413308 readonly cell: NotebookCell;
1322513309
@@ -15734,9 +15818,9 @@ declare module 'vscode' {
1573415818
1573515819 /**
1573615820 * A TestRunRequest is a precursor to a {@link TestRun}, which in turn is
15737- * created by passing a request to {@link tests.runTests }. The TestRunRequest
15738- * contains information about which tests should be run, which should not be
15739- * run, and how they are run (via the {@link TestRunRequest.profile profile}).
15821+ * created by passing a request to {@link TestController.createTestRun }. The
15822+ * TestRunRequest contains information about which tests should be run, which
15823+ * should not be run, and how they are run (via the {@link TestRunRequest.profile profile}).
1574015824 *
1574115825 * In general, TestRunRequests are created by the editor and pass to
1574215826 * {@link TestRunProfile.runHandler}, however you can also create test
@@ -15779,7 +15863,8 @@ declare module 'vscode' {
1577915863 }
1578015864
1578115865 /**
15782- * Options given to {@link TestController.runTests}
15866+ * A TestRun represents an in-progress or completed test run and
15867+ * provides methods to report the state of individual tests in the run.
1578315868 */
1578415869 export interface TestRun {
1578515870 /**
0 commit comments