Skip to content

Change errorMessages in props to optional#64

Open
mst-mkt wants to merge 1 commit intopurple-technology:masterfrom
mst-mkt:fix/types-error-messages
Open

Change errorMessages in props to optional#64
mst-mkt wants to merge 1 commit intopurple-technology:masterfrom
mst-mkt:fix/types-error-messages

Conversation

@mst-mkt
Copy link

@mst-mkt mst-mkt commented Sep 4, 2024

Issue

resolve #63

Description

The errorMessages in props was not set to optional and has been corrected.

  • before
<Camera /> // ❌ error: Property 'errorMessages' is missing in type '{ ref: RefObject<CameraType>; aspectRatio: number; }' but required in type 'CameraProps'.
  • after
<Camera /> // ⭕ ok

Also, I think it has been fixed that if each property of the errorMessages object was omitted, it did not work correctly internally.

  • before
<Camera errorMessages={{}} /> // errorMessages.noCameraAccessible <- string | undefined (inside component) ❌
  • after
<Camera errorMessages={{}} /> // errorMessages.noCameraAccessible <- string (inside component) ⭕

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

Successfully merging this pull request may close these issues.

errorMessages in props is not optional

1 participant