Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TheoMer opened this issue Sep 28, 2020 · 2 comments · Fixed by #41880
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Help Wanted You can do this
Milestone

Comments

@TheoMer
Copy link

TheoMer commented Sep 28, 2020

"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

@RyanCavanaugh RyanCavanaugh added Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Help Wanted You can do this labels Sep 29, 2020
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Sep 29, 2020
@RyanCavanaugh
Copy link
Member

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

@tvandinther
Copy link

Any progress on integrating these properties into TypeScript?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Help Wanted You can do this
Projects
None yet
3 participants