Open jhmen opened 10 months ago
I can also confirm the faulty typescript declarations.
There are multiple ways to tackle this issue:
typeof operator
These typings aren't faulty at all.
BTW, using the export =
syntax, you can only have a default export and nothing else. This is probably why the developer didn't export those classes.
Faulty as hell. Type definitions are not good at all. I cannot import dayMonthYear for example, since typing defines location "src/formats/dayMonthYear/dayMonthYear" but this location is absolute, not relative to the module, so cannot be resolved on compile time.
Yeah I agree now
Hi, I have tried to import the Parser and format classes. But I'm getting an error that the any-date-parser package does not export the classes. I think that in the index.d.ts file, the exports in the
declare module "any-date-parser"
section are missing.Used import Syntax: import { Parser, Format } from 'any-date-parser'; Error: Vue: Module 'any-date-parser' has no exported member Parser
I think this might be a solution:
But I don't know if this is best practice