You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hadn't heard of that proposal yet, that looks great! Good work by the Igalia folks.
This is in Stage 3 right now, and not yet available in Browsers (I checked Chrome), so i'd like to hold off on including it in SuperJSON core right now.
import{Temporal}from'@js-temporal/polyfill';importsuperjsonfrom'superjson';superjson.registerCustom<Temporal.PlainDate,string>({isApplicable: (v): v is Temporal.PlainDate=>vinstanceofTemporal.PlainDate,serialize: (v)=>v.toJSON(),deserialize: (v)=>Temporal.PlainDate.from(v),},'Temporal.PlainDate',);superjson.registerCustom<Temporal.Instant,string>({isApplicable: (v): v is Temporal.Instant=>vinstanceofTemporal.Instant,serialize: (v)=>v.toJSON(),deserialize: (v)=>Temporal.Instant.from(v),},'Temporal.Instant',);
Like PlainDate and more
https://tc39.es/proposal-temporal/docs/plaindate.html
The text was updated successfully, but these errors were encountered: