import { instanceToPlain , Exclude , Expose } from 'class-transformer' ; import type { ClassTransformOptions } from 'class-transformer' ; import type { DistanceDetailsInterface } from '../interface' ; @ Exclude ( ) export class Distance < ProviderRawEntryType = any > implements DistanceDetailsInterface < ProviderRawEntryType > { @ Expose ( ) distance : number ; @ Expose ( ) duration : number ; @ Expose ( ) provider : string ; @ Expose ( { groups : [ 'raw' , 'all' ] } ) raw ? : ProviderRawEntryType ; toObject ( options ? ) { return instanceToPlain < Distance < ProviderRawEntryType > > ( this , options ) as DistanceDetailsInterface < ProviderRawEntryType > ; } }