Skip to content

Commit c3dd203

Browse files
committed
Update README with PackageManager type and usage
Added PackageManager to the Module type and provided an example of requiring it using global.require. This clarifies usage for developers integrating package management functionality.
1 parent 70c864e commit c3dd203

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Here's an example of what your `config.json` file should look like:
4545
[Types Folder](./types)
4646

4747
```ts
48-
type Module = FileSystem | Reflect | Process | Module;
48+
type Module = FileSystem | Reflect | Process | Module | PackageManager;
4949

5050
interface Global {
5151
require(module: string): Module | null;
@@ -58,4 +58,5 @@ const fs: FileSystem = global.require("wx:fs");
5858
const reflect: Reflect = global.require("wx:reflect");
5959
const process: Process = global.require("wx:process");
6060
const module: Module = global.require("wx:module");
61+
const pm: PackageManager = global.require("wx:pm");
6162
```

0 commit comments

Comments
 (0)