Closed
Description
According to #35 - we should have support for Date
types implemented. But this doesn't work:
import { JSON } from "json-as/assembly";
@json
class Foo {
timestamp!: Date;
}
const foo = JSON.parse<Foo>("{\"timestamp\":\"1999-12-31T23:59:59.999Z\"}");
When compiling, I get:
ERROR TS2322: Type '~lib/date/Date' is not assignable to type '~lib/wasi_date/wasi_Date'.
:
294 │ return Date.fromString(data);
│ ~~~~~~~~~~~~~~~~~~~~~
└─ in ~lib/json-as/assembly/src/json.ts(294,12)
FAILURE 1 compile error(s)
Metadata
Metadata
Assignees
Labels
No labels