Open muuvmuuv opened 6 years ago
I'm unclear as to the degree of benefit given the very limited interface of the library in which all outputs are moment objects and all inputs either moment objects or numbers. Could you elaborate where you think this would significantly increase convenience?
In my case, I could not use your project because I always get a typing error.
You get an error that prevents you from using the library because typing information is not provided? That seems very strange to me. Could you provide some more details so I can see if I can reproduce what's going on there?
Sure! So this is the complete error I get from VS Code:
[ts]
Could not find a declaration file for module 'meeussunmoon'. '/Users/marvinheilemann/Documents/Projects/VSCode/vscode-sundial/node_modules/meeussunmoon/dist/meeussunmoon.min.js' implicitly has an 'any' type.
Try `npm install @types/meeussunmoon` if it exists or add a new declaration (.d.ts) file containing `declare module 'meeussunmoon';`
This is the test code:
import MeeusSunMoon from 'meeussunmoon';
MeeusSunMoon.options({
roundToNearestMinute: true, // default: false
returnTimeForPNMS: true, // default: false
dateFormatKeys: {'**': '‡', '--': '†'} // default {'**': '‡', '--': '†'};
});
I have no declaration.d.ts file or anything else. The project where I tested this is: VS Code Sundial
Could you provide Typescript typings so we can take advantage of intellisense from our editors?