Change:
Testing I cloned the vscode-extension-samples repository and tried to return two edits instead of one. Only the first one appears to take effect. I am wondering if this is expected? I guess I was expecting both edits to be applied since it is possible to return an array from the method.
The thought occurred to me that the edits would appear in the paste widget, and I verified this was indeed the case. I guess, by reading the TS docs I didn't catch on that this would happen
Aside from the above comment, on reading the JS Docs, the following thoughts came to mind: For the class , I was looking at the method . Consider the following code: Do the kinds and intersect here? Or is the intersection evaluated per part, so that the above do not intersect but the below kinds do? I noticed the refers to file dropping in its JS Doc. I was wondering if this is intended? The JS Doc above the field says . The same line more-or-less can be found under .
This is expected. Each is one potential way of applying the paste. We only apply one at a time and the first one is auto applied , the kinds are scoped hierarchies of parts. When we talk about intersection, only the second example would return true. The first one would not as the two top level parts and are not the same. I'll add an example in the docs to make this more clear it applies but for pasting files. I'll change the word

Discussion:
/** * Checks if this code action kind intersects `other`. * <del> * The kind `"refactor.extract"` for example intersects `refactor`, `"refactor.extract"` and ``"refactor.extract.function"`, </del> <ins> * The kind `"refactor.extract"` for example intersects `refactor`, `"refactor.extract"` and `"refactor.extract.function"`, </ins> * but not `"unicorn.refactor.extract"`, or `"refactor.extractAll"`. * * @param other Kind to check.

readonly value: string; /** <del> * Create a new kind by appending a more specific selector to the current kind. </del> <ins> * Create a new kind by appending additional scopes to the current kind. </ins> * * Does not modify the current kind. */

/** * Checks if this kind intersects `other`. * <ins> * The kind `"text.plain"` for example intersects `text`, `"text.plain"` and `"text.plain.list"`, * but not `"unicorn"`, or `"textUnicorn.plain"`. * </ins> * @param other Kind to check. */ intersects(other: DocumentDropOrPasteEditKind): boolean;

/** * Checks if `other` is a sub-kind of this `DocumentDropOrPasteEditKind`. * <ins> * The kind `"text.plain"` for example contains `"text.plain"` and `"text.plain.list"`, * but not `"text"` or `"unicorn.text.plain"`. * </ins> * @param other Kind to check. */ contains(other: DocumentDropOrPasteEditKind): boolean;

* * @param document Document being pasted into * @param ranges Range in the {@linkcode document} to paste into. <del> * @param dataTransfer The {@link DataTransfer data transfer} associated with the paste. This object is only valid for the duration of the paste operation. </del> <ins> * @param dataTransfer The {@link DataTransfer data transfer} associated with the paste. This object is only * valid for the duration of the paste operation. </ins> * @param context Additional context for the paste. * @param token A cancellation token. * <del> * @return Set of potential {@link DocumentPasteEdit edits} that can apply the paste. </del> <ins> * @return Set of potential {@link DocumentPasteEdit edits} that can apply the paste. Only a single returned * {@linkcode DocumentPasteEdit} is applied at a time. If multiple edits are returned from all providers, then * the first is automatically applied and a widget is shown that lets the user switch to the other edits. </ins> */ provideDocumentPasteEdits?(document: TextDocument, ranges: readonly Range[], dataTransfer: DataTransfer, context: DocumentPasteEditContext, token: CancellationToken): ProviderResult<T[]>;

* Use `text/uri-list` for resources dropped from the explorer or other tree views in the workbench. * * Use `files` to indicate that the provider should be invoked if any {@link DataTransferFile files} are present in the {@linkcode DataTransfer}. <del> * Note that {@linkcode DataTransferFile} entries are only created when dropping content from outside the editor, such as </del> <ins> * Note that {@linkcode DataTransferFile} entries are only created when pasting content from outside the editor, such as </ins> * from the operating system. */ readonly pasteMimeTypes?: readonly string[];