import { Definition } from '@ulangi/ulangi-common/interfaces' ; import { DefinitionRow } from '../interfaces/DefinitionRow' ; export class DefinitionRowConverter { public convertToDefinition ( definitionRow ) { const definition = { definitionId : definitionRow . definitionId , meaning : definitionRow . meaning , wordClasses : JSON . parse ( definitionRow . wordClasses ) , definitionStatus : definitionRow . definitionStatus , source : definitionRow . source , createdAt : definitionRow . createdAt , updatedAt : definitionRow . updatedAt , updatedStatusAt : definitionRow . updatedStatusAt , firstSyncedAt : definitionRow . firstSyncedAt , lastSyncedAt : definitionRow . lastSyncedAt , extraData : [ ] , } ; return definition ; } }