diff options
author | Bert Belder <bertbelder@gmail.com> | 2019-09-16 23:25:32 +0200 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2019-09-16 23:30:56 +0200 |
commit | 02cb34d8ad320360c800b9af7b941990c48b9742 (patch) | |
tree | f918c80c2ac5036bcda5ec739ff404c35b6be33b /tools/complex_permissions_test.ts | |
parent | c6afe87febc92ca64e81c1d99a62daacf75dba0a (diff) |
Fix and enable linting of deno_typescript/*, tools/*, website/* (#2962)
Diffstat (limited to 'tools/complex_permissions_test.ts')
-rw-r--r-- | tools/complex_permissions_test.ts | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/tools/complex_permissions_test.ts b/tools/complex_permissions_test.ts index b0e13b6e5..dd65a0e33 100644 --- a/tools/complex_permissions_test.ts +++ b/tools/complex_permissions_test.ts @@ -1,28 +1,26 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. -const { args, readFileSync, writeFileSync, exit, dial } = Deno; +const { args, readFileSync, writeFileSync, exit } = Deno; const name = args[1]; const test: (args: string[]) => void = { - read: (files: string[]): void => { - files.forEach((file): any => readFileSync(file)); + read(files: string[]): void { + files.forEach(file => readFileSync(file)); }, - write: (files: string[]): void => { - files.forEach( - (file): any => writeFileSync(file, new Uint8Array(), { append: true }) + write(files: string[]): void { + files.forEach(file => + writeFileSync(file, new Uint8Array(0), { append: true }) ); }, - net_fetch: (hosts: string[]): void => { - hosts.forEach((host): any => fetch(host)); + netFetch(hosts: string[]): void { + hosts.forEach(host => fetch(host)); }, - net_listen: (hosts: string[]): void => { - hosts.forEach( - (host): any => { - const listener = Deno.listen("tcp", host); - listener.close(); - } - ); + netListen(hosts: string[]): void { + hosts.forEach(host => { + const listener = Deno.listen("tcp", host); + listener.close(); + }); }, - net_dial: async (hosts: string[]): Promise<void> => { + async netDial(hosts: string[]): Promise<void> { for (const host of hosts) { const listener = await Deno.dial("tcp", host); listener.close(); |