iamkun / dayjs

⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API
https://day.js.org
MIT License
46.72k stars 2.28k forks source link

ESLint: Unsafe call of an `any` typed value.(@typescript-eslint/no-unsafe-call) #1903

Open Einere opened 2 years ago

Einere commented 2 years ago

Describe the bug

When i using dayjs in React with TypeScript, some errors occur.

import dayjs from "dayjs";

function getTime(dateTimeStr: string): string {
  return dayjs(dateTimeStr).unix().toString();
}
스크린샷 2022-05-17 오후 7 43 33

Expected behavior There is no lint errors.

Information

borisyordanov commented 3 months ago

Lint errors like this are still popping up for pretty much all the no-unsafe rules. Are there any updates on this issue?