diff options
| author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2019-05-30 14:59:30 +0200 |
|---|---|---|
| committer | Ryan Dahl <ry@tinyclouds.org> | 2019-05-30 08:59:30 -0400 |
| commit | 50a79584cb12129b3db1ef3e0eb9d0c8b9f20b62 (patch) | |
| tree | ee9a90a8b8018c03b1e1a6ace07abdaa494ea90d /fs/path/utils.ts | |
| parent | 80b3c486f6222f65b52eb2eca903b67312e8ce0c (diff) | |
chore: Implement strict mode (denoland/deno_std#453)
Original: https://github.com/denoland/deno_std/commit/be24677d15494e83eea2e99bfc5ccfdde31cb892
Diffstat (limited to 'fs/path/utils.ts')
| -rw-r--r-- | fs/path/utils.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/path/utils.ts b/fs/path/utils.ts index e50cb6d3c..7a4cd7299 100644 --- a/fs/path/utils.ts +++ b/fs/path/utils.ts @@ -49,7 +49,7 @@ export function normalizeString( let code: number; for (let i = 0, len = path.length; i <= len; ++i) { if (i < len) code = path.charCodeAt(i); - else if (isPathSeparator(code)) break; + else if (isPathSeparator(code!)) break; else code = CHAR_FORWARD_SLASH; if (isPathSeparator(code)) { @@ -107,7 +107,7 @@ export function _format( sep: string, pathObject: FormatInputPathObject ): string { - const dir: string | null = pathObject.dir || pathObject.root; + const dir: string | undefined = pathObject.dir || pathObject.root; const base: string = pathObject.base || (pathObject.name || "") + (pathObject.ext || ""); if (!dir) return base; |
