MCPcopy Index your code
hub / github.com/electric-sql/pglite / parseType

Function parseType

packages/pglite/src/types.ts:189–203  ·  view source on GitHub ↗
(
  x: string | null,
  type: number,
  parsers?: ParserOptions,
)

Source from the content-addressed store, hash-verified

187export const serializers = defaultHandlers.serializers
188
189export function parseType(
190 x: string | null,
191 type: number,
192 parsers?: ParserOptions,
193): any {
194 if (x === null) {
195 return null
196 }
197 const handler = parsers?.[type] ?? defaultHandlers.parsers[type]
198 if (handler) {
199 return handler(x, type)
200 } else {
201 return x
202 }
203}
204
205function typeHandlers(types: TypeHandlers) {
206 return Object.keys(types).reduce(

Callers 1

parseResultsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected