Open DetachHead opened 2 years ago
so it turns out there were two problems:
index.d.ts
instead of sandbox/prerequest.d.ts
)postman-sandbox
was using outdated postman-collection
types, which i've since fixed in https://github.com/postmanlabs/postman-sandbox/pull/826 and https://github.com/postmanlabs/postman-collection/pull/1271however the types in postman-collection
seem to be missing stuff like PropertyDefinition
? https://github.com/DefinitelyTyped/DefinitelyTyped/blob/c432b1015151bc90947ea2ac3b1a50a86734ad0b/types/postman-collection/index.d.ts#L45
Describe your current workflow
i am writing a fairly convoluted pre-request script which has led me to deciding to write in typescript and store it in a git repo. however, i can't seem to find any existing type definitions that match the
pm
object available in pre-request scripts. i found the types inpostman-sandbox
, however it seems to be outdated and missing quite a few things (such aspm.cookies.jar
):i've attempted to fix some of the issues in https://github.com/postmanlabs/postman-sandbox/pull/826 but i'm not too familiar with the api so i had to do a lot of guessing. i'm not even sure if it's supposed to be the same as what's available in the postman tool itself or if it's supposed to be different
Describe your ideal workflow
i can write pre-request outside of postman and get the same typescript support as within postman, using the same type definitions that are available within the postman app
Describe alternatives you've considered
No response
Additional context
No response