Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Property 'DurationFormat' does not exist on type 'typeof Intl'
+0
−0
I run this code with Deno from Temporal.PlainDate.prototype.since() - JavaScript | MDN:
const date = Temporal.PlainDate.from("2022-12-25");
const now = Temporal.Now.plainDateISO();
const duration = now.since(date);
const formatter = new Intl.DurationFormat("en-US", { style: "long" });
console.log(`It's been ${formatter.format(duration)} since that Christmas...`);
It works fine, but the LSP says:
Property 'DurationFormat' does not exist on type 'typeof Intl'.deno-ts(2339)
Why is that?
1 comment thread