summaryrefslogtreecommitdiff
path: root/std
diff options
context:
space:
mode:
Diffstat (limited to 'std')
-rw-r--r--std/encoding/_yaml/dumper/dumper.ts2
-rw-r--r--std/encoding/_yaml/dumper/dumper_state.ts6
-rw-r--r--std/encoding/_yaml/error.ts2
-rw-r--r--std/encoding/_yaml/loader/loader.ts2
-rw-r--r--std/encoding/_yaml/loader/loader_state.ts8
-rw-r--r--std/encoding/_yaml/parse.ts2
-rw-r--r--std/encoding/_yaml/schema.ts4
-rw-r--r--std/encoding/_yaml/state.ts2
-rw-r--r--std/encoding/_yaml/stringify.ts2
-rw-r--r--std/encoding/_yaml/type.ts2
-rw-r--r--std/encoding/_yaml/type/binary.ts2
-rw-r--r--std/encoding/_yaml/type/map.ts2
-rw-r--r--std/encoding/_yaml/type/omap.ts2
-rw-r--r--std/encoding/_yaml/type/pairs.ts2
-rw-r--r--std/encoding/_yaml/type/seq.ts2
-rw-r--r--std/encoding/_yaml/type/set.ts2
-rw-r--r--std/encoding/yaml.ts13
-rw-r--r--std/hash/_wasm/hash.ts2
-rw-r--r--std/hash/mod.ts4
-rw-r--r--std/io/ioutil.ts2
-rw-r--r--std/log/handlers.ts2
-rw-r--r--std/log/logger.ts2
-rw-r--r--std/log/mod.ts2
-rw-r--r--std/node/_fs/_fs_access.ts2
-rw-r--r--std/node/_fs/_fs_chmod.ts2
-rw-r--r--std/node/_fs/_fs_chown.ts2
-rw-r--r--std/node/_fs/_fs_close.ts2
-rw-r--r--std/node/_fs/_fs_copy.ts2
-rw-r--r--std/node/_fs/_fs_dir_test.ts2
-rw-r--r--std/node/_fs/_fs_link.ts2
-rw-r--r--std/node/_fs/_fs_mkdir.ts8
-rw-r--r--std/node/_fs/_fs_writeFile_test.ts2
-rw-r--r--std/node/_fs/promises/_fs_readFile.ts5
-rw-r--r--std/node/_fs/promises/_fs_writeFile.ts2
-rw-r--r--std/node/_fs/promises/_fs_writeFile_test.ts2
-rw-r--r--std/path/_util.ts2
-rw-r--r--std/path/posix.ts2
-rw-r--r--std/path/win32.ts2
-rw-r--r--std/textproto/mod.ts2
-rw-r--r--std/tsconfig_test.json5
40 files changed, 62 insertions, 55 deletions
diff --git a/std/encoding/_yaml/dumper/dumper.ts b/std/encoding/_yaml/dumper/dumper.ts
index 1280ee757..2b23d4758 100644
--- a/std/encoding/_yaml/dumper/dumper.ts
+++ b/std/encoding/_yaml/dumper/dumper.ts
@@ -6,7 +6,7 @@
/* eslint-disable max-len */
import { YAMLError } from "../error.ts";
-import { RepresentFn, StyleVariant, Type } from "../type.ts";
+import type { RepresentFn, StyleVariant, Type } from "../type.ts";
import * as common from "../utils.ts";
import { DumperState, DumperStateOptions } from "./dumper_state.ts";
diff --git a/std/encoding/_yaml/dumper/dumper_state.ts b/std/encoding/_yaml/dumper/dumper_state.ts
index 3c1de0e0e..2124ecb98 100644
--- a/std/encoding/_yaml/dumper/dumper_state.ts
+++ b/std/encoding/_yaml/dumper/dumper_state.ts
@@ -3,10 +3,10 @@
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-import { Schema, SchemaDefinition } from "../schema.ts";
+import type { Schema, SchemaDefinition } from "../schema.ts";
import { State } from "../state.ts";
-import { StyleVariant, Type } from "../type.ts";
-import { ArrayObject, Any } from "../utils.ts";
+import type { StyleVariant, Type } from "../type.ts";
+import type { ArrayObject, Any } from "../utils.ts";
const _hasOwnProperty = Object.prototype.hasOwnProperty;
diff --git a/std/encoding/_yaml/error.ts b/std/encoding/_yaml/error.ts
index 7f305ccf2..a96ab11d6 100644
--- a/std/encoding/_yaml/error.ts
+++ b/std/encoding/_yaml/error.ts
@@ -3,7 +3,7 @@
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-import { Mark } from "./mark.ts";
+import type { Mark } from "./mark.ts";
export class YAMLError extends Error {
constructor(
diff --git a/std/encoding/_yaml/loader/loader.ts b/std/encoding/_yaml/loader/loader.ts
index 39954c280..4ab3e9adc 100644
--- a/std/encoding/_yaml/loader/loader.ts
+++ b/std/encoding/_yaml/loader/loader.ts
@@ -7,7 +7,7 @@
import { YAMLError } from "../error.ts";
import { Mark } from "../mark.ts";
-import { Type } from "../type.ts";
+import type { Type } from "../type.ts";
import * as common from "../utils.ts";
import { LoaderState, LoaderStateOptions, ResultType } from "./loader_state.ts";
diff --git a/std/encoding/_yaml/loader/loader_state.ts b/std/encoding/_yaml/loader/loader_state.ts
index ca50fcaf1..781a4a086 100644
--- a/std/encoding/_yaml/loader/loader_state.ts
+++ b/std/encoding/_yaml/loader/loader_state.ts
@@ -3,11 +3,11 @@
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-import { YAMLError } from "../error.ts";
-import { Schema, SchemaDefinition, TypeMap } from "../schema.ts";
+import type { YAMLError } from "../error.ts";
+import type { Schema, SchemaDefinition, TypeMap } from "../schema.ts";
import { State } from "../state.ts";
-import { Type } from "../type.ts";
-import { Any, ArrayObject } from "../utils.ts";
+import type { Type } from "../type.ts";
+import type { Any, ArrayObject } from "../utils.ts";
export interface LoaderStateOptions {
legacy?: boolean;
diff --git a/std/encoding/_yaml/parse.ts b/std/encoding/_yaml/parse.ts
index 2aa0042bd..9a6f325f2 100644
--- a/std/encoding/_yaml/parse.ts
+++ b/std/encoding/_yaml/parse.ts
@@ -4,7 +4,7 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { CbFunction, load, loadAll } from "./loader/loader.ts";
-import { LoaderStateOptions } from "./loader/loader_state.ts";
+import type { LoaderStateOptions } from "./loader/loader_state.ts";
export type ParseOptions = LoaderStateOptions;
diff --git a/std/encoding/_yaml/schema.ts b/std/encoding/_yaml/schema.ts
index 579644dbb..98b49203c 100644
--- a/std/encoding/_yaml/schema.ts
+++ b/std/encoding/_yaml/schema.ts
@@ -4,8 +4,8 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { YAMLError } from "./error.ts";
-import { KindType, Type } from "./type.ts";
-import { ArrayObject, Any } from "./utils.ts";
+import type { KindType, Type } from "./type.ts";
+import type { ArrayObject, Any } from "./utils.ts";
function compileList(
schema: Schema,
diff --git a/std/encoding/_yaml/state.ts b/std/encoding/_yaml/state.ts
index 6df6dc047..67a105d39 100644
--- a/std/encoding/_yaml/state.ts
+++ b/std/encoding/_yaml/state.ts
@@ -3,7 +3,7 @@
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-import { SchemaDefinition } from "./schema.ts";
+import type { SchemaDefinition } from "./schema.ts";
import { DEFAULT_SCHEMA } from "./schema/mod.ts";
export abstract class State {
diff --git a/std/encoding/_yaml/stringify.ts b/std/encoding/_yaml/stringify.ts
index f037631d9..9b3b5a80e 100644
--- a/std/encoding/_yaml/stringify.ts
+++ b/std/encoding/_yaml/stringify.ts
@@ -4,7 +4,7 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { dump } from "./dumper/dumper.ts";
-import { DumperStateOptions } from "./dumper/dumper_state.ts";
+import type { DumperStateOptions } from "./dumper/dumper_state.ts";
export type DumpOptions = DumperStateOptions;
diff --git a/std/encoding/_yaml/type.ts b/std/encoding/_yaml/type.ts
index 4a2c6bbac..18dee338c 100644
--- a/std/encoding/_yaml/type.ts
+++ b/std/encoding/_yaml/type.ts
@@ -3,7 +3,7 @@
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-import { ArrayObject, Any } from "./utils.ts";
+import type { ArrayObject, Any } from "./utils.ts";
export type KindType = "sequence" | "scalar" | "mapping";
export type StyleVariant = "lowercase" | "uppercase" | "camelcase" | "decimal";
diff --git a/std/encoding/_yaml/type/binary.ts b/std/encoding/_yaml/type/binary.ts
index 1a321afe8..2433960dc 100644
--- a/std/encoding/_yaml/type/binary.ts
+++ b/std/encoding/_yaml/type/binary.ts
@@ -3,7 +3,7 @@
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { Type } from "../type.ts";
-import { Any } from "../utils.ts";
+import type { Any } from "../utils.ts";
// [ 64, 65, 66 ] -> [ padding, CR, LF ]
const BASE64_MAP =
diff --git a/std/encoding/_yaml/type/map.ts b/std/encoding/_yaml/type/map.ts
index dcd99abca..c0c8b04b7 100644
--- a/std/encoding/_yaml/type/map.ts
+++ b/std/encoding/_yaml/type/map.ts
@@ -4,7 +4,7 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { Type } from "../type.ts";
-import { Any } from "../utils.ts";
+import type { Any } from "../utils.ts";
export const map = new Type("tag:yaml.org,2002:map", {
construct(data): Any {
diff --git a/std/encoding/_yaml/type/omap.ts b/std/encoding/_yaml/type/omap.ts
index d6d751505..785846dea 100644
--- a/std/encoding/_yaml/type/omap.ts
+++ b/std/encoding/_yaml/type/omap.ts
@@ -4,7 +4,7 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { Type } from "../type.ts";
-import { Any } from "../utils.ts";
+import type { Any } from "../utils.ts";
const _hasOwnProperty = Object.prototype.hasOwnProperty;
const _toString = Object.prototype.toString;
diff --git a/std/encoding/_yaml/type/pairs.ts b/std/encoding/_yaml/type/pairs.ts
index e999748ae..5e3eac5ce 100644
--- a/std/encoding/_yaml/type/pairs.ts
+++ b/std/encoding/_yaml/type/pairs.ts
@@ -4,7 +4,7 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { Type } from "../type.ts";
-import { Any } from "../utils.ts";
+import type { Any } from "../utils.ts";
const _toString = Object.prototype.toString;
diff --git a/std/encoding/_yaml/type/seq.ts b/std/encoding/_yaml/type/seq.ts
index b19565dbc..df2caaece 100644
--- a/std/encoding/_yaml/type/seq.ts
+++ b/std/encoding/_yaml/type/seq.ts
@@ -4,7 +4,7 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { Type } from "../type.ts";
-import { Any } from "../utils.ts";
+import type { Any } from "../utils.ts";
export const seq = new Type("tag:yaml.org,2002:seq", {
construct(data): Any {
diff --git a/std/encoding/_yaml/type/set.ts b/std/encoding/_yaml/type/set.ts
index 0bfe1c8db..8fe04e6f0 100644
--- a/std/encoding/_yaml/type/set.ts
+++ b/std/encoding/_yaml/type/set.ts
@@ -4,7 +4,7 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { Type } from "../type.ts";
-import { Any } from "../utils.ts";
+import type { Any } from "../utils.ts";
const _hasOwnProperty = Object.prototype.hasOwnProperty;
diff --git a/std/encoding/yaml.ts b/std/encoding/yaml.ts
index 78866ed2a..19245b2fc 100644
--- a/std/encoding/yaml.ts
+++ b/std/encoding/yaml.ts
@@ -3,13 +3,12 @@
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-export { ParseOptions, parse, parseAll } from "./_yaml/parse.ts";
-export {
- DumpOptions as StringifyOptions,
- stringify,
-} from "./_yaml/stringify.ts";
-export { SchemaDefinition } from "./_yaml/schema.ts";
-export { StyleVariant } from "./_yaml/type.ts";
+export type { ParseOptions } from "./_yaml/parse.ts";
+export { parse, parseAll } from "./_yaml/parse.ts";
+export type { DumpOptions as StringifyOptions } from "./_yaml/stringify.ts";
+export { stringify } from "./_yaml/stringify.ts";
+export type { SchemaDefinition } from "./_yaml/schema.ts";
+export type { StyleVariant } from "./_yaml/type.ts";
export {
CORE_SCHEMA,
DEFAULT_SCHEMA,
diff --git a/std/hash/_wasm/hash.ts b/std/hash/_wasm/hash.ts
index d04a4d4a0..43ddf77f3 100644
--- a/std/hash/_wasm/hash.ts
+++ b/std/hash/_wasm/hash.ts
@@ -10,7 +10,7 @@ import init, {
import * as hex from "../../encoding/hex.ts";
import * as base64 from "../../encoding/base64.ts";
-import { Hasher, Message, OutputFormat } from "../hasher.ts";
+import type { Hasher, Message, OutputFormat } from "../hasher.ts";
await init(source);
diff --git a/std/hash/mod.ts b/std/hash/mod.ts
index 946769f03..06c9ce439 100644
--- a/std/hash/mod.ts
+++ b/std/hash/mod.ts
@@ -1,9 +1,9 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { Hash } from "./_wasm/hash.ts";
-import { Hasher } from "./hasher.ts";
+import type { Hasher } from "./hasher.ts";
-export { Hasher } from "./hasher.ts";
+export type { Hasher } from "./hasher.ts";
export type SupportedAlgorithm =
| "md2"
| "md4"
diff --git a/std/io/ioutil.ts b/std/io/ioutil.ts
index 3d9e72b56..ac6d103a3 100644
--- a/std/io/ioutil.ts
+++ b/std/io/ioutil.ts
@@ -1,5 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-import { BufReader } from "./bufio.ts";
+import type { BufReader } from "./bufio.ts";
type Reader = Deno.Reader;
type Writer = Deno.Writer;
import { assert } from "../_util/assert.ts";
diff --git a/std/log/handlers.ts b/std/log/handlers.ts
index 0efa7cc26..e09dc648c 100644
--- a/std/log/handlers.ts
+++ b/std/log/handlers.ts
@@ -1,6 +1,6 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { getLevelByName, LevelName, LogLevels } from "./levels.ts";
-import { LogRecord } from "./logger.ts";
+import type { LogRecord } from "./logger.ts";
import { red, yellow, blue, bold } from "../fmt/colors.ts";
import { existsSync, exists } from "../fs/exists.ts";
import { BufWriterSync } from "../io/bufio.ts";
diff --git a/std/log/logger.ts b/std/log/logger.ts
index 05e83dc77..482047f2a 100644
--- a/std/log/logger.ts
+++ b/std/log/logger.ts
@@ -5,7 +5,7 @@ import {
getLevelName,
LevelName,
} from "./levels.ts";
-import { BaseHandler } from "./handlers.ts";
+import type { BaseHandler } from "./handlers.ts";
export interface LogRecordOptions {
msg: string;
diff --git a/std/log/mod.ts b/std/log/mod.ts
index ed94725c4..9565749aa 100644
--- a/std/log/mod.ts
+++ b/std/log/mod.ts
@@ -8,7 +8,7 @@ import {
RotatingFileHandler,
} from "./handlers.ts";
import { assert } from "../_util/assert.ts";
-import { LevelName } from "./levels.ts";
+import type { LevelName } from "./levels.ts";
export { LogLevels, LevelName } from "./levels.ts";
export { Logger } from "./logger.ts";
diff --git a/std/node/_fs/_fs_access.ts b/std/node/_fs/_fs_access.ts
index ee93c4c7f..79e4ca96d 100644
--- a/std/node/_fs/_fs_access.ts
+++ b/std/node/_fs/_fs_access.ts
@@ -1,6 +1,6 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-import { CallbackWithError } from "./_fs_common.ts";
+import type { CallbackWithError } from "./_fs_common.ts";
import { notImplemented } from "../_utils.ts";
/** Revist once https://github.com/denoland/deno/issues/4017 lands */
diff --git a/std/node/_fs/_fs_chmod.ts b/std/node/_fs/_fs_chmod.ts
index b1079e0a1..844afd21d 100644
--- a/std/node/_fs/_fs_chmod.ts
+++ b/std/node/_fs/_fs_chmod.ts
@@ -1,6 +1,6 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-import { CallbackWithError } from "./_fs_common.ts";
+import type { CallbackWithError } from "./_fs_common.ts";
import { fromFileUrl } from "../path.ts";
const allowedModes = /^[0-7]{3}/;
diff --git a/std/node/_fs/_fs_chown.ts b/std/node/_fs/_fs_chown.ts
index cd1973b1f..56068ef73 100644
--- a/std/node/_fs/_fs_chown.ts
+++ b/std/node/_fs/_fs_chown.ts
@@ -1,6 +1,6 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-import { CallbackWithError } from "./_fs_common.ts";
+import type { CallbackWithError } from "./_fs_common.ts";
import { fromFileUrl } from "../path.ts";
/**
diff --git a/std/node/_fs/_fs_close.ts b/std/node/_fs/_fs_close.ts
index cdd815ad9..add6f6663 100644
--- a/std/node/_fs/_fs_close.ts
+++ b/std/node/_fs/_fs_close.ts
@@ -1,6 +1,6 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-import { CallbackWithError } from "./_fs_common.ts";
+import type { CallbackWithError } from "./_fs_common.ts";
export function close(fd: number, callback: CallbackWithError): void {
queueMicrotask(() => {
diff --git a/std/node/_fs/_fs_copy.ts b/std/node/_fs/_fs_copy.ts
index 26d9a8c9a..72f43d18f 100644
--- a/std/node/_fs/_fs_copy.ts
+++ b/std/node/_fs/_fs_copy.ts
@@ -1,6 +1,6 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-import { CallbackWithError } from "./_fs_common.ts";
+import type { CallbackWithError } from "./_fs_common.ts";
import { fromFileUrl } from "../path.ts";
export function copyFile(
diff --git a/std/node/_fs/_fs_dir_test.ts b/std/node/_fs/_fs_dir_test.ts
index e89912772..2d2d5f585 100644
--- a/std/node/_fs/_fs_dir_test.ts
+++ b/std/node/_fs/_fs_dir_test.ts
@@ -1,6 +1,6 @@
import { assert, assertEquals, fail } from "../../testing/asserts.ts";
import Dir from "./_fs_dir.ts";
-import Dirent from "./_fs_dirent.ts";
+import type Dirent from "./_fs_dirent.ts";
Deno.test({
name: "Closing current directory with callback is successful",
diff --git a/std/node/_fs/_fs_link.ts b/std/node/_fs/_fs_link.ts
index 50916a7ba..df08e13b1 100644
--- a/std/node/_fs/_fs_link.ts
+++ b/std/node/_fs/_fs_link.ts
@@ -1,6 +1,6 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-import { CallbackWithError } from "./_fs_common.ts";
+import type { CallbackWithError } from "./_fs_common.ts";
import { fromFileUrl } from "../path.ts";
/**
diff --git a/std/node/_fs/_fs_mkdir.ts b/std/node/_fs/_fs_mkdir.ts
index a65db8dba..8578f4653 100644
--- a/std/node/_fs/_fs_mkdir.ts
+++ b/std/node/_fs/_fs_mkdir.ts
@@ -1,5 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-import { CallbackWithError } from "./_fs_common.ts";
+import type { CallbackWithError } from "./_fs_common.ts";
import { fromFileUrl } from "../path.ts";
/**
@@ -31,10 +31,11 @@ export function mkdir(
if (options.recursive !== undefined) recursive = options.recursive;
if (options.mode !== undefined) mode = options.mode;
}
- if (typeof recursive !== "boolean")
+ if (typeof recursive !== "boolean") {
throw new Deno.errors.InvalidData(
"invalid recursive option , must be a boolean"
);
+ }
Deno.mkdir(path, { recursive, mode })
.then(() => {
if (typeof callback === "function") {
@@ -61,10 +62,11 @@ export function mkdirSync(path: string | URL, options?: MkdirOptions): void {
if (options.recursive !== undefined) recursive = options.recursive;
if (options.mode !== undefined) mode = options.mode;
}
- if (typeof recursive !== "boolean")
+ if (typeof recursive !== "boolean") {
throw new Deno.errors.InvalidData(
"invalid recursive option , must be a boolean"
);
+ }
Deno.mkdirSync(path, { recursive, mode });
}
diff --git a/std/node/_fs/_fs_writeFile_test.ts b/std/node/_fs/_fs_writeFile_test.ts
index 3959ad219..015ed6553 100644
--- a/std/node/_fs/_fs_writeFile_test.ts
+++ b/std/node/_fs/_fs_writeFile_test.ts
@@ -6,7 +6,7 @@ import {
assertThrows,
} from "../../testing/asserts.ts";
import { writeFile, writeFileSync } from "./_fs_writeFile.ts";
-import { TextEncodings } from "./_fs_common.ts";
+import type { TextEncodings } from "./_fs_common.ts";
import * as path from "../../path/mod.ts";
const testDataDir = path.resolve(path.join("node", "_fs", "testdata"));
diff --git a/std/node/_fs/promises/_fs_readFile.ts b/std/node/_fs/promises/_fs_readFile.ts
index 83ef9ac50..8677e05cd 100644
--- a/std/node/_fs/promises/_fs_readFile.ts
+++ b/std/node/_fs/promises/_fs_readFile.ts
@@ -1,5 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-import {
+import type {
FileOptionsArgument,
BinaryOptionsArgument,
TextOptionsArgument,
@@ -21,8 +21,9 @@ export function readFile(
return new Promise((resolve, reject) => {
readFileCallback(path, options, (err, data): void => {
if (err) return reject(err);
- if (data == null)
+ if (data == null) {
return reject(new Error("Invalid state: data missing, but no error"));
+ }
resolve(data);
});
});
diff --git a/std/node/_fs/promises/_fs_writeFile.ts b/std/node/_fs/promises/_fs_writeFile.ts
index 4f7c39a6a..48b9bf0ea 100644
--- a/std/node/_fs/promises/_fs_writeFile.ts
+++ b/std/node/_fs/promises/_fs_writeFile.ts
@@ -1,5 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-import { Encodings, WriteFileOptions } from "../_fs_common.ts";
+import type { Encodings, WriteFileOptions } from "../_fs_common.ts";
import { writeFile as writeFileCallback } from "../_fs_writeFile.ts";
diff --git a/std/node/_fs/promises/_fs_writeFile_test.ts b/std/node/_fs/promises/_fs_writeFile_test.ts
index 8f6ef0842..6901fff22 100644
--- a/std/node/_fs/promises/_fs_writeFile_test.ts
+++ b/std/node/_fs/promises/_fs_writeFile_test.ts
@@ -6,7 +6,7 @@ import {
assertThrowsAsync,
} from "../../../testing/asserts.ts";
import { writeFile } from "./_fs_writeFile.ts";
-import { TextEncodings } from "../_fs_common.ts";
+import type { TextEncodings } from "../_fs_common.ts";
const decoder = new TextDecoder("utf-8");
diff --git a/std/path/_util.ts b/std/path/_util.ts
index 8ae40373b..0c3253045 100644
--- a/std/path/_util.ts
+++ b/std/path/_util.ts
@@ -2,7 +2,7 @@
// Ported from https://github.com/browserify/path-browserify/
/** This module is browser compatible. */
-import { FormatInputPathObject } from "./_interface.ts";
+import type { FormatInputPathObject } from "./_interface.ts";
import {
CHAR_UPPERCASE_A,
CHAR_LOWERCASE_A,
diff --git a/std/path/posix.ts b/std/path/posix.ts
index 1e78d1cfe..351ceb06e 100644
--- a/std/path/posix.ts
+++ b/std/path/posix.ts
@@ -2,7 +2,7 @@
// Ported from https://github.com/browserify/path-browserify/
/** This module is browser compatible. */
-import { FormatInputPathObject, ParsedPath } from "./_interface.ts";
+import type { FormatInputPathObject, ParsedPath } from "./_interface.ts";
import { CHAR_DOT, CHAR_FORWARD_SLASH } from "./_constants.ts";
import {
diff --git a/std/path/win32.ts b/std/path/win32.ts
index bac43a61a..30482e453 100644
--- a/std/path/win32.ts
+++ b/std/path/win32.ts
@@ -2,7 +2,7 @@
// Ported from https://github.com/browserify/path-browserify/
/** This module is browser compatible. */
-import { FormatInputPathObject, ParsedPath } from "./_interface.ts";
+import type { FormatInputPathObject, ParsedPath } from "./_interface.ts";
import {
CHAR_DOT,
CHAR_BACKWARD_SLASH,
diff --git a/std/textproto/mod.ts b/std/textproto/mod.ts
index f440ba5d5..1d0d22715 100644
--- a/std/textproto/mod.ts
+++ b/std/textproto/mod.ts
@@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-import { BufReader } from "../io/bufio.ts";
+import type { BufReader } from "../io/bufio.ts";
import { concat } from "../bytes/mod.ts";
import { decode } from "../encoding/utf8.ts";
diff --git a/std/tsconfig_test.json b/std/tsconfig_test.json
new file mode 100644
index 000000000..1dbf69fb2
--- /dev/null
+++ b/std/tsconfig_test.json
@@ -0,0 +1,5 @@
+{
+ "compilerOptions": {
+ "importsNotUsedAsValues": "error"
+ }
+}