TurboModule spec checking should accept hstring for string arguments #14322
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
If you have a turbo module spec that defines a method as taking a string parameter, then you should be able to use an
hstring
on the native side.Currently the module works correctly when using an
hstring
, but if you use the codegen'd spec to validate that the native TurboModule correctly implements the methods from JS, the build will fail because it does not correctly identifyhstring
as being a valid argument type for a JS string.As an example the built in Clipboard module is currently using
std::wstring
. Changing it tohstring
without this change will cause the build to fail.Microsoft Reviewers: Open in CodeFlow