I'm trying to use the library class-transformer(https://github.com/typestack/class-transformer) to serialize typescript classes to firebase, which doesn't accept customs types.
The thing is some of the data are actually data compatible with firebase, like "coordinates" being in the GeoPoint format.
I've this class being serialized:
export abstract class StopStep extends Step {
id: string;
name: string;
description: string;
pointOfInterest: PointOfInterest | null;
address: string;
coordinates: firebase.firestore.GeoPoint;
}
I would like to prevent the "coordinates" field to be transformed. It should be present, just not untransformed.
I tried to play with the @Transform(({value})=>...), but it appears it's only an "additional" transformation, it doesn't allow me to just keep the same format.
I also tried Exclude, but then the field isn't present anymore.
Is there a way to accomplish this with this library?