Closed Schlumpf9 closed 4 years ago
hey @Schlumpf9, I will come up with a solution in a few days and will let you know when there's a new release.
hey @Schlumpf9 , I'm trying to rewrite the plugin with TypeScript. Unfortunately I'm still trying... 😥 It would be great if anyone could help solving my issue https://github.com/moment/moment/issues/5341#issue-546064276 in the official moment repo
I was able to compile my Angular project with the following definitions:
types/moment/index.d.ts
import moment = require('moment');
export = moment;
declare module 'moment' {
interface MomentHolidayResult {
allStates: boolean,
holidayName: string,
holidayStates: Array<string>,
testedStates: Array<string>
}
interface Moment {
isHoliday(_states?: string | Array<string>): MomentHolidayResult;
}
}
@Schlumpf9 I finished the refactoring and published a new version. Feel free to give feedback 🙂
Hey, it would be great if the project contains a typescript index.d.ts file. So in typescript projects as in Angular the compiler doesn't claim that the function isHoliday doesn't exist.