( typeInfo: TypeInfo, typeResolver: CodecBuilder["resolver"], )
| 113 | } |
| 114 | |
| 115 | function varInt32ObjectReadKind( |
| 116 | typeInfo: TypeInfo, |
| 117 | typeResolver: CodecBuilder["resolver"], |
| 118 | ): "number" | "bigint" | null { |
| 119 | if ( |
| 120 | toRefMode(typeInfo.trackingRef, typeInfo.nullable) !== RefMode.NONE |
| 121 | || !typeResolver.isMonomorphic(typeInfo, typeInfo.dynamic) |
| 122 | ) { |
| 123 | return null; |
| 124 | } |
| 125 | const scalarAction = getCompatibleScalarReadAction(typeInfo); |
| 126 | if (scalarAction !== undefined) { |
| 127 | return scalarAction.remoteNullable !== true |
| 128 | && scalarAction.remoteTypeId === TypeId.VARINT32 |
| 129 | && (scalarAction.localTypeId === TypeId.INT64 |
| 130 | || scalarAction.localTypeId === TypeId.VARINT64 |
| 131 | || scalarAction.localTypeId === TypeId.TAGGED_INT64) |
| 132 | ? "bigint" |
| 133 | : null; |
| 134 | } |
| 135 | return typeInfo.typeId === TypeId.VARINT32 ? "number" : null; |
| 136 | } |
| 137 | |
| 138 | function directNumericFieldReadExpr( |
| 139 | typeInfo: TypeInfo, |
no test coverage detected