JSONPatcherProxy icon indicating copy to clipboard operation
JSONPatcherProxy copied to clipboard

Correct glitch with type definitions

Open FTWinston opened this issue 5 years ago • 1 comments

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 avatar May 27 '20 18:05 FTWinston

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

FTWinston avatar May 27 '20 18:05 FTWinston