https://deno.land/std/testing/asserts.ts seems to be broken.
deno --version
deno 1.1.3
v8 8.5.216
typescript 3.9.2
import { assert } from "https://deno.land/std/testing/asserts.ts";
Empty output. No errors.
error: TS2345 [ERROR]: Argument of type '{ depth: number; sorted: boolean; trailingComma: boolean; compact: boolean; iterableLimit: number; }' is not assignable to parameter of type 'InspectOptions'.
Object literal may only specify known properties, and 'sorted' does not exist in type 'InspectOptions'.
sorted: true,
~~~~~~~~~~~~
at https://deno.land/std/testing/asserts.ts:26:9
Yeah, I've got the same problem with the same version of yours.
I think this is the result of https://github.com/denoland/deno/commit/5ec41cbcc2778a80b6ee91f0c391fc2edec0a8e0
Not sure though. It also started happening to me this morning.
Cc @nayeemrmn
Replace
import { assert } from "https://deno.land/std/testing/asserts.ts";
with
import { assert } from "https://deno.land/[email protected]/testing/asserts.ts";
Also, you should be getting warnings for this on download... didn't expect to see this issue anymore.
Yep same thing happened for me, using 0.59.0 fixed it
Getting it too. Let me see if the fix works
Same issue, the deno binary should match the std libraries.
Not a bug. As described by @nayeemrmn please use tagged version of imports to prevent this issue from happenning again.
@bartlomieju, with all due respect, I disagree. It's certainly a bug: if not in the product, then at least in documentation.
How could a situation when tutorial's examples refuse to work out of the box not be a bug?
How could a situation when tutorial's examples refuse to work out of the box not be a bug?
The examples assume you are using the current release of Deno. You were not. How is that the bug in the documentation?
@kitsonk I did use the latest release, which was 1.1.3 at the moment.
I did use the latest release, which was 1.1.3 at the moment.
And using the latest std release for tagged imports - although the deno and std versions are not the same, it's best they still be matched: Deno v1.2.0 = std 0.61.0
Most helpful comment
Replace
with