fix: add type extensions to postman-collection types

This commit is contained in:
Andrew Bastin
2022-03-14 02:04:04 +05:30
parent fda9f2e842
commit cb92a8d7a6

View File

@@ -0,0 +1,21 @@
import "postman-collection"
/*
There are some small mismatches in some types that the 'postman-collection'
package provides (come on guys ;) ). These type definitions append extra
information which is present in the runtime values of the types
*/
type PMRawLanguage = "text" | "javascript" | "json" | "html" | "xml"
declare module "postman-collection" {
interface RequestBody {
// Options is not well-defined by the schema, so we are treating everything as optional for runtime safety.
// See: https://schema.postman.com/collection/json/v2.1.0/draft-04/collection.json
options?: {
raw?: {
language?: PMRawLanguage
}
}
}
}