Skip to content

Commit

Permalink
Fix Path.mktemp requiring a parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Apr 13, 2023
1 parent c922b94 commit 6f6c26f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/vendor/Path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ export default class Path {
return this.string.split('/')
}

static mktemp({ prefix, dir }: { prefix?: string, dir?: Path }): Path {
static mktemp(opts?: { prefix?: string, dir?: Path }): Path {
const {prefix, dir} = opts ?? {}
const rv = Deno.makeTempDirSync({prefix, dir: dir?.mkpath().string})
return new Path(rv)
}
Expand Down Expand Up @@ -339,7 +340,7 @@ export default class Path {
async *readLines(): AsyncIterableIterator<string> {
const fd = Deno.openSync(this.string)
try {
for await (const line of readLines(fd))
for await (const line of readLines(fd))
yield line
}
finally {
Expand Down

0 comments on commit 6f6c26f

Please sign in to comment.