Palindrom / JSONPatcherProxy

ES6 proxy powered JSON Object observer that emits JSON patches when changes occur to your object tree.
94 stars 14 forks source link

Correct glitch with type definitions #61

Open FTWinston opened 4 years ago

FTWinston commented 4 years ago

The type definitions indicate that JSONPatcherProxy is a default export, but it isn't. It's a named export, so this PR just changes the type definition file to account for this.

Without this change, in typescript this shows no error: import JSONPatcherProxy from 'jsonpatcherproxy'; but at runtime I get: TypeError: jsonpatcherproxy_1.default is not a constructor

And if I try to use a named import: import { JSONPatcherProxy } from 'jsonpatcherproxy'; I get a "has no exported member 'JSONPatcherProxy'" error.

With this change, the named imports satisfy typescript and work at runtime.

FTWinston commented 4 years ago

Regarding the failed CI, the master branch is failing with the same error currently :)