diff options
-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 |