Skip to content

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

Closed

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

Activity

  1. RyanCavanaugh commented on Sep 29, 2020

    @RyanCavanaugh
    Member

    dateStyle isn't a recognized property in our lib file yet; we should add it

  2. tvandinther commented on Nov 10, 2020

    @tvandinther

    Any progress on integrating these properties into TypeScript?

  3. locked as resolved and limited conversation to collaborators on Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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