-
Notifications
You must be signed in to change notification settings - Fork 39
Closed
Description
Trying to access any object property that is typed as object will lead to typescript errors like:
Property 'x' does not exist on type 'object'.ts(2339)
In my specific case, I am trying to fetch images from a folder using the SDK and accessing image.embeddedMetadata?.title, which raises the type error above.
Could it be taken into consideration the possibility of specifying types a bit more, where properties are currently typed as object? For example by using Record<string, string | number> or maybe even more specific when the structure of a property is well-defined, I am thinking versionInfo might be one of these cases where it could be typed as { name: string; id: string }
Metadata
Metadata
Assignees
Labels
No labels