import { ExpressionType } from './expression_type' ; import { ExpressionValue } from './types' ; import { getType } from './get_type' ; const identity = < T > ( x ) => x ; export const serializeProvider = ( types ) => ( { serialize : ( value ) => ( types [ getType ( value ) ] . serialize || identity ) ( value ) , deserialize : ( value ) => ( types [ getType ( value ) ] . deserialize || identity ) ( value ) , } ) ;