/** * Copyright (c) 2020-present, Goldman Sachs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import type { PlainObject } from './CommonUtils'; import type { ClazzOrModelSchema, ModelSchema, PropSchema } from 'serializr'; import { SKIP } from 'serializr'; export declare const deseralizeMap: (val: Record, schema?: ClazzOrModelSchema | undefined) => Map; export declare const serializeMap: (val: Map | undefined, schema?: ClazzOrModelSchema | undefined) => Record; export declare class BasicSerializationFactory { readonly schema: ModelSchema; constructor(schema: ModelSchema); } export declare class SerializationFactory extends BasicSerializationFactory { toJson: (val: T) => PlainObject; fromJson: (val: PlainObject) => T; } export declare const usingModelSchema: (schema: ModelSchema) => PropSchema; export declare const serializeArray: (values: any, itemSerializer: (val: any) => any, skipIfEmpty: boolean) => any[] | typeof SKIP; export declare const deserializeArray: (values: any, itemDeserializer: (val: any) => any, skipIfEmpty: boolean) => any[] | typeof SKIP; export declare const usingConstantValueSchema: (value: unknown | typeof SKIP) => PropSchema; //# sourceMappingURL=SerializationUtils.d.ts.map