Skip to content
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

Error using new isoWeek plugin: "error TS2304: Cannot find name 'UnitType'" #827

Closed
Toub opened this issue Mar 9, 2020 · 5 comments · Fixed by #828
Closed

Error using new isoWeek plugin: "error TS2304: Cannot find name 'UnitType'" #827

Toub opened this issue Mar 9, 2020 · 5 comments · Fixed by #828
Labels
☢️Bug Something isn't working released

Comments

@Toub
Copy link
Contributor

Toub commented Mar 9, 2020

Describe the bug

After installing last version (1.8.22) to be able to use isoWeek plugin by @iamkun, I get a typescript compilation error:

/node_modules/dayjs/plugin/isoWeek.d.ts(6,20): error TS2304: Cannot find name 'UnitType'.

In the regarding file, UnitType is not imported:

import { PluginFunc, QUnitType, ConfigType } from 'dayjs'

declare const plugin: PluginFunc
export = plugin

type ISOUnitType = UnitType | 'isoWeek'; // TS2304: Cannot find name 'UnitType'.

Expected behavior

Typescript build should be OK.

Information

  • Day.js Version 1.8.22
  • Typescript: 3.5.3
  • OS: linux/docker

Related issues

@iamkun
Copy link
Owner

iamkun commented Mar 9, 2020

will do thanks.

@iamkun iamkun added the ☢️Bug Something isn't working label Mar 9, 2020
@iamkun
Copy link
Owner

iamkun commented Mar 9, 2020

And it will be great if you could send us a pull request to fix this type definition error. 😬

@Toub
Copy link
Contributor Author

Toub commented Mar 9, 2020

@iamkun are you going to release a patch to npm with this one soon?

@iamkun
Copy link
Owner

iamkun commented Mar 9, 2020

in this week

@iamkun
Copy link
Owner

iamkun commented Mar 16, 2020

🎉 This issue has been resolved in version 1.8.23 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
☢️Bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants