Open joprice opened 3 weeks ago
I think we can just alias to op_Implicit
to fromDate
:
// Write code or load a sample from sidebar
open System
let _: DateTimeOffset = DateTime.UtcNow.Date
let x = DateTimeOffset(DateTime.UtcNow.Date)
import { fromDate, op_Implicit } from "fable-library-js/DateOffset.js";
import { utcNow, date } from "fable-library-js/Date.js";
op_Implicit(date(utcNow()));
export const x = fromDate(date(utcNow()));
We can do it directly in the Replacement
module to avoid having a new function in fable-library
, I will have a look at it later.
Description
When a DateTime gets implicitly converted to a DateTimeOffset, the import
op_Implicit
is missing in the js library:SyntaxError: The requested module 'https://fable.io/repl/js/repl/fable-library-js/DateOffset.js' does not provide an export named 'op_Implicit' (at 0110e4f1-0010-49d1-b621-0c084f71ae75:62:10)
Repro code
Related information