diff options
author | 2022-12-17 16:18:01 -0800 | |
---|---|---|
committer | 2022-12-17 16:18:01 -0800 | |
commit | 24c4d92c0b7693de336879bfe5d1388aa0f5aaf6 (patch) | |
tree | 770d6b022c66a244fa336eb05eb3a990f43b9473 | |
parent | 184c56704b1238f261794ecfe0e47b136f61f3f0 (diff) | |
download | bun-24c4d92c0b7693de336879bfe5d1388aa0f5aaf6.tar.gz bun-24c4d92c0b7693de336879bfe5d1388aa0f5aaf6.tar.zst bun-24c4d92c0b7693de336879bfe5d1388aa0f5aaf6.zip |
Update globals.d.ts
-rw-r--r-- | packages/bun-types/globals.d.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/bun-types/globals.d.ts b/packages/bun-types/globals.d.ts index 2671dd1f0..b0cd1783b 100644 --- a/packages/bun-types/globals.d.ts +++ b/packages/bun-types/globals.d.ts @@ -271,9 +271,12 @@ interface ImportMeta { resolveSync(moduleId: string, parent?: string): string; /** - * Resolve a module ID the same as if you imported it + * Load a CommonJS module * - * The `parent` argument is optional, and defaults to the current module's path. + * Internally, this is a synchronous version of ESModule's `import()`, with extra code for handling: + * - CommonJS modules + * - *.node files + * - *.json files * * Warning: **This API is not stable** and may change in the future. Use at your * own risk. Usually, you should use `require` instead and Bun's transpiler |