mirror of
https://github.com/denoland/deno.git
synced 2024-11-25 15:29:32 -05:00
Rename class name DenoFile to DomFileImpl (#3006)
This commit is contained in:
parent
97bb2bdb79
commit
4ff04ad96f
3 changed files with 5 additions and 6 deletions
|
@ -2,8 +2,7 @@
|
|||
import * as domTypes from "./dom_types.ts";
|
||||
import * as blob from "./blob.ts";
|
||||
|
||||
// TODO Rename this to DomFileImpl
|
||||
export class DenoFile extends blob.DenoBlob implements domTypes.DomFile {
|
||||
export class DomFileImpl extends blob.DenoBlob implements domTypes.DomFile {
|
||||
lastModified: number;
|
||||
name: string;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ class FormDataBase {
|
|||
requiredArguments("FormData.append", arguments.length, 2);
|
||||
name = String(name);
|
||||
if (value instanceof blob.DenoBlob) {
|
||||
const dfile = new domFile.DenoFile([value], filename || name);
|
||||
const dfile = new domFile.DomFileImpl([value], filename || name);
|
||||
this[dataSymbol].push([name, dfile]);
|
||||
} else {
|
||||
this[dataSymbol].push([name, String(value)]);
|
||||
|
@ -112,7 +112,7 @@ class FormDataBase {
|
|||
if (this[dataSymbol][i][0] === name) {
|
||||
if (!found) {
|
||||
if (value instanceof blob.DenoBlob) {
|
||||
const dfile = new domFile.DenoFile([value], filename || name);
|
||||
const dfile = new domFile.DomFileImpl([value], filename || name);
|
||||
this[dataSymbol][i][1] = dfile;
|
||||
} else {
|
||||
this[dataSymbol][i][1] = String(value);
|
||||
|
@ -129,7 +129,7 @@ class FormDataBase {
|
|||
// Otherwise, append entry to the context object’s entry list.
|
||||
if (!found) {
|
||||
if (value instanceof blob.DenoBlob) {
|
||||
const dfile = new domFile.DenoFile([value], filename || name);
|
||||
const dfile = new domFile.DomFileImpl([value], filename || name);
|
||||
this[dataSymbol].push([name, dfile]);
|
||||
} else {
|
||||
this[dataSymbol].push([name, String(value)]);
|
||||
|
|
|
@ -101,7 +101,7 @@ export type Blob = domTypes.Blob;
|
|||
|
||||
export type Body = domTypes.Body;
|
||||
|
||||
window.File = domFile.DenoFile as domTypes.DomFileConstructor;
|
||||
window.File = domFile.DomFileImpl as domTypes.DomFileConstructor;
|
||||
export type File = domTypes.DomFile;
|
||||
|
||||
export type CustomEventInit = domTypes.CustomEventInit;
|
||||
|
|
Loading…
Reference in a new issue