bun-types-no-globals 1.2.20-canary.20250810T140630

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,21 @@
1
+ # bun-types-no-globals
2
+
3
+ Publishes the Bun types with no globals, useful for library authors that need to consume parts of Bun's APIs with versions of @types/bun, but without loading the globals which can cause conflicts
4
+
5
+ ### Requiring these
6
+
7
+ We recommend you require these types with a triple slash reference anywhere in your program
8
+
9
+ ```ts
10
+ /// <reference path="path/to/node_modules/bun-types-no-globals/index.d.ts">
11
+ ```
12
+
13
+ The **alternative** is to include it in your tsconfig.json types array
14
+
15
+ ```jsonc
16
+ {
17
+ "compilerOptions": {
18
+ "types": ["bun-types-no-globals"],
19
+ },
20
+ }
21
+ ```
@@ -0,0 +1,31 @@
1
+ declare module "*.txt" {
2
+ var text: string;
3
+ export = text;
4
+ }
5
+
6
+ declare module "*.toml" {
7
+ var contents: any;
8
+ export = contents;
9
+ }
10
+
11
+ declare module "*.jsonc" {
12
+ var contents: any;
13
+ export = contents;
14
+ }
15
+
16
+ declare module "*/bun.lock" {
17
+ var contents: import("bun").BunLockFile;
18
+ export = contents;
19
+ }
20
+
21
+ declare module "*.html" {
22
+ // In Bun v1.2, we might change this to Bun.HTMLBundle
23
+ var contents: any;
24
+ export = contents;
25
+ }
26
+
27
+ declare module "*.svg" {
28
+ // Bun 1.2.3 added support for frontend dev server
29
+ var contents: `${string}.svg`;
30
+ export = contents;
31
+ }