Closed atombrenner closed 6 months ago
you have to create a declaration file every time
Did you see https://www.npmjs.com/package/@types/exif-reader ?
Yes. The type definitions from DefinitelyTyped just make the initial error go away, but after that all tags are still of type unknown
.
IMHO the type definitions and developer experience can be improved by adding more specific type definitions to the package. For example, the tags DateTimeOriginal
, DateTimeDigitized
and ModifyDate
are always of type Date
. Packaging has the additional benefit that you don't need to install another dependency, and that the types are in sync with potential implementation changes.
I can create a PR with my current to demonstrate the improvement.
Closing as v2.0.0 moved the TypeScript definitions in-house.
If you use this project with typescript, you have to create a declaration file every time to prevent this error:
It will be easier to add type definitions directly to this project instead of maintaining a mirror in the already too large DefinetelyTyped (@types) project.