import { ValueTransformer } from 'typeorm' ; export class BoardTransformer implements ValueTransformer { to ( board ) { return JSON . stringify ( board ) ; } from ( stringified ) { return JSON . parse ( stringified ) ; } }