Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update return type of ScriptOptions.importModuleDynamically #71912

Merged
merged 3 commits into from
Feb 13, 2025

Conversation

rhumbertgz
Copy link
Contributor

When the importModuleDynamically is a function, it should be an async function instead of an async one as shown in this example https://nodejs.org/docs/latest-v22.x/api/vm.html#when-importmoduledynamically-is-a-function.
However, the docs and its types definitions are not up-to-date.

When the importModuleDynamically is a function, it should be an `async` function instead of an `async` one as shown in this example https://nodejs.org/docs/latest-v22.x/api/vm.html#when-importmoduledynamically-is-a-function. 
However, the docs and its types definitions are not up-to-date.
@typescript-bot
Copy link
Contributor

typescript-bot commented Feb 11, 2025

@rhumbertgz Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through.

This is a live comment that I will keep updated.

1 package in this PR

Code Reviews

Because this is a widely-used package, a DT maintainer will need to review it before it can be merged.

You can test the changes of this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • 🕐 Only a DT maintainer can approve changes without tests

Once every item on this list is checked, I'll ask you for permission to merge and publish the changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 71912,
  "author": "rhumbertgz",
  "headCommitOid": "4c3b894058cb53e497ed782ed6de9a7ec588c6ab",
  "mergeBaseOid": "36f851c86a080a406b8d5dc8e95880363d16083b",
  "lastPushDate": "2025-02-11T08:37:56.000Z",
  "lastActivityDate": "2025-02-13T01:56:40.000Z",
  "hasMergeConflict": false,
  "isFirstContribution": true,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "node",
      "kind": "edit",
      "files": [
        {
          "path": "types/node/vm.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "Microsoft",
        "jkomyno",
        "alvis",
        "r3nya",
        "btoueg",
        "smac89",
        "touffy",
        "DeividasBakanas",
        "eyqs",
        "Hannes-Magnusson-CK",
        "hoo29",
        "kjin",
        "ajafff",
        "islishude",
        "mwiktorczyk",
        "mohsen1",
        "galkin",
        "parambirs",
        "eps1lon",
        "ThomasdenH",
        "WilcoBakker",
        "wwwy3y3",
        "samuela",
        "kuehlein",
        "bhongy",
        "chyzwar",
        "trivikr",
        "yoursunny",
        "qwelias",
        "ExE-Boss",
        "peterblazejewicz",
        "addaleax",
        "victorperin",
        "NodeJS",
        "LinusU",
        "wafuwafu13",
        "mcollina",
        "Semigradsky"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "stale",
      "reviewer": "Renegade334",
      "date": "2025-02-13T01:56:40.000Z",
      "abbrOid": "826eaf0"
    }
  ],
  "mainBotCommentID": 2650734557,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added Critical package Untested Change This PR does not touch tests labels Feb 11, 2025
@typescript-bot typescript-bot added the Revision needed This PR needs code changes before it can be merged. label Feb 13, 2025
@typescript-bot
Copy link
Contributor

@rhumbertgz One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you!

Add support for both Module and Promise<Module> as return types for importModuleDynamically

Co-authored-by: René <[email protected]>
@typescript-bot typescript-bot removed the Revision needed This PR needs code changes before it can be merged. label Feb 13, 2025
@typescript-bot
Copy link
Contributor

@Renegade334 Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

@weswigham weswigham merged commit 2895999 into DefinitelyTyped:master Feb 13, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Critical package Untested Change This PR does not touch tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants