Fixed typescript typing for sandbox#113
Fixed typescript typing for sandbox#113joepjoosten wants to merge 2 commits intoJSONPath-Plus:mainfrom
Conversation
|
#114 |
|
Ok, sure. But could you start us off with a sample TS file which adds a sandbox? We already have typescript as a devDep, so we should be able to add an npm script to test such a sample file (as we do against the declaration file itself), and I'd ultimately like to confirm all our type mappings against this sample file. |
|
Yes, i'll add one. |
|
FYI, I've made some tweaks to types at #115 . I can merge after your PR, but just letting you know, as I think those changes add some more specificity than just "any" (or greater clarity in the case where "JSON" or "any" can be returned (on JS objects)). |
|
Tried to create a typescript test with this code: |
|
Can you use a relative path instead? |
|
Also tried that, but doesn't work... |
|
I'm afraid I'm really falling behind on my other projects, and I have close to no experience in using TS. |
|
Hi, I was having the same issue, for the time being, I've updated the jsonpath.d.ts and set the sandbox type to any. This will allow typescript to compile and also run. Can I recommend this update be made in the interim for typescript. Thanks. |
|
I've added some further commits to #115 . Would you mind trying that out? I think that should solve the |
I was using jsonpath plus in my typescript app, and noticed that the sandbox has the wrong typing. This will result in a compilation error in typescript, and makes using the sandbox setting impossible.
Could you release this asap? Otherwise using the sandbox settings with typescript is not possible.