aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-12-17 16:15:09 -0800
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-12-17 16:15:58 -0800
commit184c56704b1238f261794ecfe0e47b136f61f3f0 (patch)
tree4f60bf253566f06ef81471da06663d8db0e991c5
parentfeea8824f1da05a43f602e8f9f94ff1862c848d0 (diff)
downloadbun-184c56704b1238f261794ecfe0e47b136f61f3f0.tar.gz
bun-184c56704b1238f261794ecfe0e47b136f61f3f0.tar.zst
bun-184c56704b1238f261794ecfe0e47b136f61f3f0.zip
Add warning in import.meta.require
-rw-r--r--packages/bun-types/globals.d.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/bun-types/globals.d.ts b/packages/bun-types/globals.d.ts
index fa49aec1d..2671dd1f0 100644
--- a/packages/bun-types/globals.d.ts
+++ b/packages/bun-types/globals.d.ts
@@ -274,6 +274,11 @@ interface ImportMeta {
* Resolve a module ID the same as if you imported it
*
* The `parent` argument is optional, and defaults to the current module's path.
+ *
+ * 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
+ * will automatically rewrite your code to use `import.meta.require` if
+ * relevant.
*/
require: NodeJS.Require;
}