Thought I'd describe something that's not exactly a bug, but can be confusing: there are differences between what can be serialized using Deno KV and what you can send to an island.
Let's say I have something like this:
type Message = {
text: string,
created: Date
}
This will serialize to Deno KV, but when I send it to an Island, the date will be converted to a string using Date's toJSON() method.
However, it type-checks fine. You won't notice any problem until runtime.
It would be convenient if the serialization used by islands were extended to dates and other types that KV can serialize. But when that's not feasible, it seems like there should be some kind of linter warning about types that won't serialize as you expect?
Adding support for serializing days objects makes sense. We can't add long rules for this as it would require the linter to be aware of types, which it doesn't support. It just checks the AST tree.
Thought I'd describe something that's not exactly a bug, but can be confusing: there are differences between what can be serialized using Deno KV and what you can send to an island.
Let's say I have something like this:
This will serialize to Deno KV, but when I send it to an Island, the date will be converted to a string using Date's toJSON() method.
However, it type-checks fine. You won't notice any problem until runtime.
It would be convenient if the serialization used by islands were extended to dates and other types that KV can serialize. But when that's not feasible, it seems like there should be some kind of linter warning about types that won't serialize as you expect?