summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoshihisa Mochihara <motihara@gmail.com>2018-12-27 10:45:58 +0100
committerRyan Dahl <ry@tinyclouds.org>2018-12-27 09:45:58 +0000
commit3d9f46a6cfc14d890d9899fdd4df2cc993478cc0 (patch)
tree969bd29a1e213fd7189ab496a6ecbe3f761e092c
parent5e518b741704b738e29352c341ee6a956cce1fff (diff)
Rename file.ts to dom_file.ts (#1423)
-rw-r--r--BUILD.gn2
-rw-r--r--js/dom_file.ts (renamed from js/file.ts)3
-rw-r--r--js/form_data.ts8
3 files changed, 5 insertions, 8 deletions
diff --git a/BUILD.gn b/BUILD.gn
index e2ab95f43..f5a5f30dd 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -61,7 +61,7 @@ ts_sources = [
"js/dom_types.ts",
"js/errors.ts",
"js/fetch.ts",
- "js/file.ts",
+ "js/dom_file.ts",
"js/file_info.ts",
"js/files.ts",
"js/flatbuffers.ts",
diff --git a/js/file.ts b/js/dom_file.ts
index 6b5a4fbd0..2c225248b 100644
--- a/js/file.ts
+++ b/js/dom_file.ts
@@ -1,7 +1,4 @@
// Copyright 2018 the Deno authors. All rights reserved. MIT license.
-// TODO Rename this file to js/dom_file.ts it's currently too similarly named to
-// js/files.ts
-
import * as domTypes from "./dom_types";
import * as blob from "./blob";
diff --git a/js/form_data.ts b/js/form_data.ts
index 163c33b74..8f89b54b5 100644
--- a/js/form_data.ts
+++ b/js/form_data.ts
@@ -1,7 +1,7 @@
// Copyright 2018 the Deno authors. All rights reserved. MIT license.
import * as domTypes from "./dom_types";
import * as blob from "./blob";
-import * as file from "./file";
+import * as domFile from "./dom_file";
import { DomIterableMixin } from "./mixins/dom_iterable";
import { requiredArguments } from "./util";
@@ -22,7 +22,7 @@ class FormDataBase {
requiredArguments("FormData.append", arguments.length, 2);
name = String(name);
if (value instanceof blob.DenoBlob) {
- const dfile = new file.DenoFile([value], filename || name);
+ const dfile = new domFile.DenoFile([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 file.DenoFile([value], filename || name);
+ const dfile = new domFile.DenoFile([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 file.DenoFile([value], filename || name);
+ const dfile = new domFile.DenoFile([value], filename || name);
this[dataSymbol].push([name, dfile]);
} else {
this[dataSymbol].push([name, String(value)]);