MCPcopy Create free account
hub / github.com/callstackincubator/polygen / matchW2CRType

Function matchW2CRType

packages/codegen/src/codegen/utils.ts:105–115  ·  view source on GitHub ↗
(t?: ValueType)

Source from the content-addressed store, hash-verified

103
104// TODO: workaround a bug(?) that all types are returned as either none, u32 or f64
105export function matchW2CRType(t?: ValueType): string {
106 if (!t) {
107 return 'void';
108 }
109
110 // TODO: figure out why wasm2c returns u32 for number types sometimes
111 if (t.startsWith('i')) {
112 return t.replace(/^i/, 'u');
113 }
114 return t;
115}

Callers 1

processEntityFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected