Issue when I ran the first code demo on servest document
Closed this issue · 2 comments
Deleted user commented
► https://deno.land/std@v0.7.0/io/bufio.ts:7:24
7 type ReadResult = Deno.ReadResult;
~~~~~~~~~~
error TS2339: Property 'nread' does not exist on type 'number'.
► https://deno.land/std@v0.7.0/io/bufio.ts:134:19
134 assert(rr.nread >= 0, "negative read");
~~~~~
error TS2694: Namespace 'Deno' has no exported member 'ReadResult'.
► https://raw.githubusercontent.com/keroxp/servest/v0.8.0/readers.ts:6:26
6 import ReadResult = Deno.ReadResult;
~~~~~~~~~~
error TS2339: Property 'eof' does not exist on type 'Number'.
► https://raw.githubusercontent.com/keroxp/servest/v0.8.0/readers.ts:13:13
13 const { eof, nread } = await reader.read(nullBuffer);
~~~
error TS2339: Property 'nread' does not exist on type 'Number'.
► https://raw.githubusercontent.com/keroxp/servest/v0.8.0/readers.ts:13:18
13 const { eof, nread } = await reader.read(nullBuffer);
~~~~~
error TS2339: Property 'nread' does not exist on type 'Number'.
► https://raw.githubusercontent.com/keroxp/servest/v0.8.0/readers.ts:35:11
35 let { nread, eof } = await this.reader.read(buf);
~~~~~
error TS2339: Property 'eof' does not exist on type 'Number'.
► https://raw.githubusercontent.com/keroxp/servest/v0.8.0/readers.ts:35:18
35 let { nread, eof } = await this.reader.read(buf);
~~~
error TS2339: Property 'nread' does not exist on type 'Number'.
► https://raw.githubusercontent.com/keroxp/servest/v0.8.0/serveio.ts:331:13
331 const { nread, eof } = await reader.read(buf);
~~~~~
error TS2339: Property 'eof' does not exist on type 'Number'.
► https://raw.githubusercontent.com/keroxp/servest/v0.8.0/serveio.ts:331:20
331 const { nread, eof } = await reader.read(buf);
~~~
Found 9 errors.```
keroxp commented
@vnknowledge2014 Oh, README's example is too old. What is your deno version? If you use deno v0.15.0 or higher, try to use latest release (v0.9.1) . Or simply remove version info from import URL.
keroxp commented
Hope those errors have been fixed. close.