Add receiveCommand to the Java Delegate

Summary: Adding support for receiving commands and calling methods defined on the interface in https://github.com/facebook/react-native/commit/c7ee38149d02b64bae6aadcc72c4f664900ff0cb

Reviewed By: JoshuaGross

Differential Revision: D16434402

fbshipit-source-id: a539050a1a2b2a67f9ba7145ed789de700461589
This commit is contained in:
Eli White authored and Facebook Github Bot committed 2019-07-24 12:45:15 -07:00
1 parent 4ab9da134c
commit 4eca2e226c
4 files changed
+121 -13

No files matched your search

@@ -16,11 +16,17 @@ function upperCaseFirst(inString: string): string {
return inString[0].toUpperCase() + inString.slice(1);
}
function toSafeJavaString(input: string): string {
return input
.split('-')
.map(upperCaseFirst)
.join('');
function toSafeJavaString(
input: string,
shouldUpperCaseFirst?: boolean,
): string {
const parts = input.split('-');
if (shouldUpperCaseFirst === false) {
return parts.join('');
}
return parts.map(upperCaseFirst).join('');
}
function getImports(component: ComponentShape): Set<string> {