(value: T)
| 76 | * encodeRValue(123) // [RType.STANDARD, 123] |
| 77 | */ |
| 78 | export const encodeRValue = <T = unknown>(value: T): REncoded<T> => { |
| 79 | switch (value) { |
| 80 | case undefined: |
| 81 | return R_UNDEFINED as [RType.UNDEFINED]; |
| 82 | case null: |
| 83 | return R_NULL as [RType.NULL]; |
| 84 | default: |
| 85 | return [RType.STANDARD, value] as [RType.STANDARD, T]; |
| 86 | } |
| 87 | }; |
no outgoing calls
no test coverage detected