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,7 +46,7 @@ function chkOptions(opt: ReadOptions): void {
|
|||
}
|
||||
if (
|
||||
INVALID_RUNE.includes(opt.comma) ||
|
||||
INVALID_RUNE.includes(opt.comment) ||
|
||||
(typeof opt.comment === "string" && INVALID_RUNE.includes(opt.comment)) ||
|
||||
opt.comma === opt.comment
|
||||
) {
|
||||
throw new Error("Invalid Delimiter");
|
||||
|
@ -122,7 +122,7 @@ export async function readMatrix(
|
|||
}
|
||||
): Promise<string[][]> {
|
||||
const result: string[][] = [];
|
||||
let _nbFields: number;
|
||||
let _nbFields: number | undefined;
|
||||
let lineResult: string[];
|
||||
let first = true;
|
||||
let lineIndex = 0;
|
||||
|
@ -253,8 +253,10 @@ export async function parse(
|
|||
});
|
||||
}
|
||||
if (opt.parse) {
|
||||
assert(opt.parse != null, "opt.parse must be set");
|
||||
return r.map((e: string[]): unknown => opt.parse(e));
|
||||
return r.map((e: string[]): unknown => {
|
||||
assert(opt.parse, "opt.parse must be set");
|
||||
return opt.parse(e);
|
||||
});
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue