Comments (6)
Hi, I personally don't use typescript in my projects so I can't help with this. Sorry...
@johnolos could you please help here?
from date-holidays.
I'll take a look once I got time. Just saw this now.
For the record, we use this in our code-base and it's working just fine. What TypeScript version are you using?
Our tsconfig.json
{
"compilerOptions": {
"baseUrl": ".",
"outDir": "build/dist",
"module": "esnext",
"target": "es5",
"lib": ["es2017", "dom"],
"sourceMap": true,
"allowJs": true,
"jsx": "react",
"moduleResolution": "node",
"rootDir": "src",
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noImplicitAny": true,
"strictNullChecks": false,
"suppressImplicitAnyIndexErrors": true,
"noUnusedLocals": true,
"allowSyntheticDefaultImports": true
},
"exclude": [
"node_modules",
"build",
"scripts",
"acceptance-tests",
"webpack",
"jest",
"src/setupTests.ts"
]
}
from date-holidays.
@tonakai Any news on this issue from your side?
from date-holidays.
hi,
sorry i must have missed the emails,
similar to #45 my tsconfig contains, "module": "commonjs", changing it to esnext causes bunch of errors on other imports, looks like a similar issue however this is a node project instead of angular
from date-holidays.
@tonakai this problem seams to be unrelated to this project. Could you please confirm by closing this issue?
from date-holidays.
I'm having the same issue, the problem is that the module is exported as module.exports = Holiday
, and typings for those kinds of exports should look like export = Holiday
, export default Holidays
could be used if the module was exported something like module.exports = { ...Holiday, default: Holiday }
(the default property needs to have a value if you want to use a default import).
Note that when you do change the typings to export = ...
you might encounter this issue and you have to import it as import * as Holidays from 'date-holidays'
.
Because of the linked issue, you'll probably need to somehow exclude the entire typings file and write your own.
The way I resolved this issue was to fall back to date-holidays: 1.2.7
(the last version without typings) and wrote my own version of the typings.
There is probably a better way to do this, but going back to an old version wasn't really an issue for my project so it was the easiest for me.
In case someone asks, my tsconfing.json has module: "commonjs"
and I'm using Typescript version 3.3.3333
from date-holidays.
Related Issues (20)
- Feature request: RRule integration?
- Generated files not updated for version `3.21.1` HOT 1
- Add boxing day as observance holiday in BE,VLG HOT 2
- performance issues HOT 2
- Inconsistencies in classification of Dutch public holidays HOT 1
- Incorrect Holiday Recognition on November 15, 2023, for Japan Locale HOT 5
- is this going to break tomorrow? Federal reserve holidays falling on weekends
- Suggestion: Add unique ID to each holiday. HOT 2
- Christmas eve HOT 1
- Public holiday "easter -2" for HU
- Re-enable type checking tests
- Security Vulnerability - Prototype Pollution in lodash.pick HOT 2
- 19.03 Joseftag is optional [Austria] HOT 1
- Enable/Disable does not seem to work for 2024?
- Help with SG Holidays Date HOT 2
- HU.yaml - incorrect name of the public holiday 15th March HOT 1
- UAE faith based holidays return different format
- Documentation Issue: Missing data.js File in Build Instructions HOT 3
- Christmas rule not being honored for Saturday HOT 2
- Not working! HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from date-holidays.