bun-types-no-globals 1.3.3-canary.20251113T140630 → 1.3.3-canary.20251115T140608
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 +1 -2
- package/lib/index.d.ts +0 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -47,7 +47,6 @@ export function createPlugin(): BunPlugin | WebpackPlugin | VitePlugin {
|
|
|
47
47
|
Sometimes you'll still want the Bun namespace to globally exist - this is most helpful in situations where actually including a runtime import from `bun` is more inconvenient than using the Bun namespace itself. You can tell TypeScript about the namespace by including this code somewhere in your program:
|
|
48
48
|
|
|
49
49
|
```ts
|
|
50
|
-
// File could be called `bun.ns.d.ts` for example
|
|
51
50
|
import * as BunModule from 'bun';
|
|
52
51
|
|
|
53
52
|
declare global {
|
|
@@ -62,7 +61,7 @@ I wrote a little about the above syntax [on my blog about Ambient Declarations](
|
|
|
62
61
|
We recommend you require these types with a triple slash reference anywhere in your program
|
|
63
62
|
|
|
64
63
|
```ts
|
|
65
|
-
/// <reference
|
|
64
|
+
/// <reference types="bun-types-no-globals/lib/index.d.ts" />
|
|
66
65
|
```
|
|
67
66
|
|
|
68
67
|
The **alternative** is to include it in your tsconfig.json types array
|
package/lib/index.d.ts
CHANGED
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
/// <reference path="./extensions.d.ts" />
|
|
10
10
|
/// <reference path="./devserver.d.ts" />
|
|
11
11
|
/// <reference path="./ffi.d.ts" />
|
|
12
|
-
/// <reference path="./html-rewriter.d.ts" />
|
|
13
12
|
/// <reference path="./jsc.d.ts" />
|
|
14
13
|
/// <reference path="./sqlite.d.ts" />
|
|
15
14
|
/// <reference path="./test.d.ts" />
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bun-types-no-globals",
|
|
3
|
-
"version": "1.3.3-canary.
|
|
3
|
+
"version": "1.3.3-canary.20251115T140608",
|
|
4
4
|
"main": "./generator/index.ts",
|
|
5
5
|
"types": "./lib/index.d.ts",
|
|
6
6
|
"description": "TypeScript type definitions for Bun without global types pollution",
|