Document DataTransferItem (#151442)
This adds missing documentation to the `DataTransferItem` api typepull/148832/head^2
parent
89606c8297
commit
070fb39a3c
|
@ -10058,14 +10058,27 @@ declare module 'vscode' {
|
|||
}
|
||||
|
||||
/**
|
||||
* A class for encapsulating data transferred during a drag and drop event.
|
||||
*
|
||||
* You can use the `value` of the `DataTransferItem` to get back the object you put into it
|
||||
* so long as the extension that created the `DataTransferItem` runs in the same extension host.
|
||||
* Encapsulates data transferred during drag and drop operations.
|
||||
*/
|
||||
export class DataTransferItem {
|
||||
/**
|
||||
* Get a string representation of this item.
|
||||
*
|
||||
* If {@linkcode DataTransferItem.value} is an object, this returns the result of json stringifying {@linkcode DataTransferItem.value} value.
|
||||
*/
|
||||
asString(): Thenable<string>;
|
||||
|
||||
/**
|
||||
* Custom data stored on this item.
|
||||
*
|
||||
* You can use `value` to share data across operations. The original object can be retrieved so long as the extension that
|
||||
* created the `DataTransferItem` runs in the same extension host.
|
||||
*/
|
||||
readonly value: any;
|
||||
|
||||
/**
|
||||
* @param value Custom data stored on this item. Can be retrieved using {@linkcode DataTransferItem.value}.
|
||||
*/
|
||||
constructor(value: any);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue