Skip to content

typescript check for pre-request scripts is incorrectly including @types/node #10939

Open
@DetachHead

Description

@DetachHead

Is there an existing issue for this?

  • I have searched the tracker for existing similar issues and I know that duplicates will be closed

Describe the Issue

as far as i can tell, pre-request scripts do not run in a nodejs environment, but typescript seems to check them with the @types/node package included

i suspect it may be caused by this:

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/b6e1b73743d2fdf87d61b0e667e015835aa021f6/types/postman-collection/index.d.ts#L6

Steps To Reproduce

  1. create a pre-request script
  2. access a nodejs specific variable like __dirname and hover over it to see the type definition

Screenshots or Videos

image

Operating System

windows 10

Postman Version

9.19.0

Postman Platform

Postman App

Additional Context?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions