Skip to content

Commit

Permalink
[APITEST-766] Added Packages to Collection Schema
Browse files Browse the repository at this point in the history
  • Loading branch information
aditya-baradwaj committed Feb 12, 2024
1 parent a175ec3 commit f18fa6b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/collection/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ _.assign(Script.prototype, /** @lends Script.prototype */ {
* @type {string}
*/
this.type = options.type || 'text/javascript';

/**
* @arguments {Script.prototype}
* @type {Array<Object>}
*/
this.packages = options.packages || [];
_.has(options, 'src') && (

/**
Expand Down
3 changes: 3 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2158,15 +2158,18 @@ declare module "postman-collection" {
* @param [options.type] - Script type
* @param [options.src] - Script source url
* @param [options.exec] - Script to execute
* @param [options.packages] - List of packages to be preloaded
*/
update(options?: {
type?: string;
src?: string;
exec?: string[] | string;
packages?: Object[];
}): void;
type: string;
src: Url;
exec: string[];
packages: Object[];
/**
* Check whether an object is an instance of ItemGroup.
* @param obj - -
Expand Down

0 comments on commit f18fa6b

Please sign in to comment.