-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Typescript Issue - Type expected issue on line 20 #1300
Comments
Can you please provide a reproduction repo? tsc Version 3.9.5 tested fine on my side. |
Me also having the same issue and getting this error during run time: TypeError: dayjs.extend is not a function |
Same issue as the initial report.
tsconfig.json: {
"compilerOptions": {
"sourceMap": false,
"inlineSources": false,
"inlineSourceMap": false,
"noEmit": false,
"declaration": true,
"stripInternal": true,
"outDir": "dist",
"downlevelIteration": true,
"esModuleInterop": true,
"importHelpers": false,
"module": "commonjs",
"moduleResolution": "node",
"noFallthroughCasesInSwitch": true,
"removeComments": true,
"target": "es6"
},
"include": [
"src",
"test"
]
} test.ts: import dayjs, { Dayjs } from "dayjs"; build: $ tsc -p tsconfig.json
node_modules/dayjs/index.d.ts:20:29 - error TS1110: Type expected.
20 type UnitTypeLongPlural = `${UnitTypeLong}s`
~~~
Found 1 error. |
Updating typescript to "typescript": "^4.1.3" fixed the issue. If you cannot upgrade then the problem still exists is the lower versions of typescript 3.9.5 |
wiill fix soon |
🎉 This issue has been resolved in version 1.10.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I'm still experiencing an issue I think related to this where there is an
I will probably need to fork chrono-node and pin the dayjs version in use to something earlier to resolve this as I'm not using Yarn in this particular project to be able to control |
I see the comment in #1281 (comment) indicating that version 1.10.0 unintentionally introduced an ESM-related breaking change and that 1.10.2 will reverse this. I'll fork chrono-node for the moment to pin to 1.9.8 and will see if 1.10.2 fixes the issue. |
## [1.10.1](iamkun/dayjs@v1.10.0...v1.10.1) (2021-01-03) ### Bug Fixes * fix typescript type error UnitTypeLongPlural ([#1302](iamkun/dayjs#1302)) ([bfaabe4](iamkun/dayjs@bfaabe4)), closes [#1300](iamkun/dayjs#1300)
## [1.10.1](iamkun/dayjs@v1.10.0...v1.10.1) (2021-01-03) ### Bug Fixes * fix typescript type error UnitTypeLongPlural ([#1302](iamkun/dayjs#1302)) ([bfaabe4](iamkun/dayjs@bfaabe4)), closes [#1300](iamkun/dayjs#1300)
## [1.10.1](iamkun/dayjs@v1.10.0...v1.10.1) (2021-01-03) ### Bug Fixes * fix typescript type error UnitTypeLongPlural ([#1302](iamkun/dayjs#1302)) ([bfaabe4](iamkun/dayjs@bfaabe4)), closes [#1300](iamkun/dayjs#1300)
dayjs/types/index.d.ts
Line 20 in bc53b53
node_modules/dayjs/index.d.ts:20:29 - error TS1110: Type expected.
tsc Version 3.9.5
issue from commit 676d09b#diff-093ad82a25aee498b11febf1cdcb6546e4d223ffcb49ed69cc275ac27ce0ccceR20
The text was updated successfully, but these errors were encountered: