MCPcopy Create free account
hub / github.com/expo/expo / formatJavaType

Function formatJavaType

tools/src/dynamic-macros/AndroidMacrosGenerator.ts:9–18  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

7const EXPO_DIR = Directories.getExpoRepositoryRootDir();
8
9function formatJavaType(value) {
10 if (value == null) {
11 return 'String';
12 } else if (typeof value === 'string') {
13 return 'String';
14 } else if (typeof value === 'number') {
15 return 'int';
16 }
17 throw new Error(`Unsupported literal value: ${value}`);
18}
19
20function chunkString(s: string, len: number) {
21 const size = Math.ceil(s.length / len);

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…