Skip to content

Type '{ dateStyle: string; }' has no properties in common with type 'DateTimeFormatOptions'.ts(2559) #40806

Closed
@TheoMer

Description

@TheoMer

"typescript": "^4.0.3"

How do I resolve the above mentioned typescript error I'm receiving on the following code?:

components/OrderListItem.tsx

const newedate = (_date) => {
  const options = {dateStyle: 'medium'}; //{ weekday: 'long', hour: 'numeric'};
  const dateT = new Intl.DateTimeFormat('en-UK', options).format(_date);
  return dateT;
}

enter image description here

My partial repo is here: https://github.com/TheoMer/next_apollo

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions