Error using new isoWeek plugin: "error TS2304: Cannot find name 'UnitType'"
See original GitHub issueDescribe 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
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
TypeScript getting error TS2304: cannot find name ' require'
Using typings (DefinitelyTyped's replacement) you can specify a definition directly from a GitHub repository. Install typings npm install typings -g --save-dev.
Read more >error TS2304 Cannot find name 'IterableIterator' - YouTube
error TS2304 Cannot find name 'IterableIterator' - Typescript error when converting ts to js. 2.2K views 2 years ago.
Read more >iamkun/dayjs (Raised $1,326.00) - Issuehunt
Day.js 2KB immutable date library alternative to Moment.js with the same modern API ... Error using new isoWeek plugin: "error TS2304: Cannot find...
Read more >unit.rs - source - SWC
{} Ok(attrs.input) } } /// Use the `DW_AT_sibling` attribute to find the input buffer for the /// next sibling. Returns `None` if the...
Read more >[Caml-list] Attn: Development Editor, Latest OCaml Weekly News
Bug fixes, a couple new features, better hints and error messages - I won't ... that OCaml 5 (with multicore support) does not...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

in this week
🎉 This issue has been resolved in version 1.8.23 🎉
The release is available on:
Your semantic-release bot 📦🚀