Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type for Image.meta #623

Open
landrevj opened this issue Jun 28, 2023 · 0 comments
Open

Type for Image.meta #623

landrevj opened this issue Jun 28, 2023 · 0 comments

Comments

@landrevj
Copy link

landrevj commented Jun 28, 2023

Hey! I've been using this package for a project I've been working on and I've got it doing what I need it to but I'm having some issues with the typescript type for Image.meta.

meta: object;

The issue is that the object type represents "any non-primitive type" rather than "an object that has key/value pairs". This means when you try and access exif/tiff it throws an error:
image

Was this deliberately meant to be object or would something like { [key: string]: any } or Record<string, any> be more appropriate? Either of those would result in meta being typed as an object with unspecified key/value pairs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant