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

fix: specify explicit type to prevent type issues at build #2410

Merged
merged 1 commit into from
May 15, 2024

Conversation

FrederikBolding
Copy link
Member

Our current declaration for getTextChildren are autogenerated since no explicit type is declared, however the generated type causes type errors since it directly reference the runtime:

export declare function getTextChildren(value: string): (string | import("@metamask/snaps-sdk/jsx-runtime").StandardFormattingElement | import("@metamask/snaps-sdk/jsx-runtime").SnapElement<import("@metamask/snaps-sdk/jsx-runtime").LinkProps, "Link"> | null)[];

We can work around this problem by specifying an explicit type declaration for the function.

@FrederikBolding FrederikBolding requested a review from a team as a code owner May 15, 2024 14:51
@FrederikBolding FrederikBolding force-pushed the fb/fix-type-declaration-for-utils branch from 34611e6 to d6f56b0 Compare May 15, 2024 14:51
@FrederikBolding FrederikBolding merged commit 8df9a32 into main May 15, 2024
151 checks passed
@FrederikBolding FrederikBolding deleted the fb/fix-type-declaration-for-utils branch May 15, 2024 15:01
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.

None yet

2 participants