mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
Enable TS strict mode by default (#3899)
Fixes #3324 Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
This commit is contained in:
parent
852823fa50
commit
90125566bb
56 changed files with 314 additions and 179 deletions
|
@ -46,13 +46,13 @@ export function normalizeString(
|
|||
let lastSegmentLength = 0;
|
||||
let lastSlash = -1;
|
||||
let dots = 0;
|
||||
let code: number;
|
||||
let code: number | undefined;
|
||||
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)) {
|
||||
if (isPathSeparator(code!)) {
|
||||
if (lastSlash === i - 1 || dots === 1) {
|
||||
// NOOP
|
||||
} else if (lastSlash !== i - 1 && dots === 2) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue