happy-dom
Version:
Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. It includes many web standards from WHATWG DOM and HTML.
30 lines • 664 B
TypeScript
import File from '../file/File.cjs';
/**
* Data transfer item.
*
* Reference:
* https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItem.
*/
export default class DataTransferItem {
#private;
readonly kind: 'string' | 'file';
readonly type: string;
/**
* Constructor.
*
* @param item Item.
* @param type Type.
*/
constructor(item: string | File, type?: string);
/**
* Returns file.
*/
getAsFile(): File;
/**
* Returns string.
*
* @param callback Callback.
*/
getAsString(callback: (text: string) => void): void;
}
//# sourceMappingURL=DataTransferItem.d.ts.map