benjamine / jsondiffpatch

Diff & patch JavaScript objects
MIT License
4.86k stars 472 forks source link

TS2339: Property 'log' does not exist on type 'Formatter'. #292

Closed muescha closed 1 year ago

muescha commented 4 years ago

docs

docs wrong for TypeScript at:

https://github.com/benjamine/jsondiffpatch/blob/master/docs/formatters.md#console

where:

jsondiffpatch.console.log(result)

error:

TS2339: Property 'log' does not exist on type 'Formatter'.

workaround

jsondiffpatch.formatters.console.format(result, null)

see also:

Methuselah96 commented 1 year ago

Fixed in https://github.com/benjamine/jsondiffpatch/pull/345.