版博士V2.0程序
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

39 lignes
785 B

  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. /**
  4. *
  5. */
  6. class DataTransferItem {
  7. /**
  8. * Constructor.
  9. *
  10. * @param item Item.
  11. */
  12. constructor(item) {
  13. this.kind = '';
  14. this.type = '';
  15. this._item = null;
  16. this.kind = typeof item === 'string' ? 'string' : 'file';
  17. this._item = item;
  18. }
  19. /**
  20. * Returns file.
  21. */
  22. getAsFile() {
  23. if (this.kind === 'string') {
  24. return null;
  25. }
  26. return this._item;
  27. }
  28. /**
  29. * Returns string.
  30. */
  31. getAsString() {
  32. if (this.kind === 'file') {
  33. return null;
  34. }
  35. return this._item;
  36. }
  37. }
  38. exports.default = DataTransferItem;
  39. //# sourceMappingURL=DataTransferItem.js.map