Skip to content

Commit 9511e5e

Browse files
committed
fix: correct globals typing
1 parent 23b7baa commit 9511e5e

File tree

4 files changed

+22
-23
lines changed

4 files changed

+22
-23
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
2-
dist
2+
dist
3+
playground

playground/bun.lockb

6.33 KB
Binary file not shown.

playground/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"devDependencies": {
66
"@antfu/ni": "^0.21.3",
77
"bun-types": "^0.5.0",
8-
"haxx": "^0.5.1"
8+
"haxx": "0.5.3"
99
},
1010
"peerDependencies": {
1111
"typescript": "^5.0.0"

src/globals.ts

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
1-
import * as tools from './tools'
2-
import * as core from './core'
1+
import * as _ from './index.js'
32

4-
Object.assign(global, tools)
5-
Object.assign(global, core)
3+
Object.assign(global, _)
64

75
declare global {
8-
const $: typeof core.$
9-
const argv: typeof core.argv
10-
const cd: typeof core.cd
11-
const kleur: typeof tools.kleur
12-
const fs: typeof tools.fs
13-
const glob: typeof tools.glob
14-
const nothrow: typeof core.nothrow
15-
const os: typeof tools.os
16-
const path: typeof tools.path
17-
const sleep: typeof core.sleep
18-
const YAML: typeof tools.YAML
19-
const io: typeof tools.io
20-
const read: typeof tools.read
21-
const write: typeof tools.write
22-
const template: typeof tools.template
23-
const style: typeof tools.style
24-
const resguard: typeof tools.resguard
6+
const $: typeof _.$
7+
const argv: typeof _.argv
8+
const cd: typeof _.cd
9+
const kleur: typeof _.kleur
10+
const fs: typeof _.fs
11+
const glob: typeof _.glob
12+
const nothrow: typeof _.nothrow
13+
const os: typeof _.os
14+
const path: typeof _.path
15+
const sleep: typeof _.sleep
16+
const YAML: typeof _.YAML
17+
const io: typeof _.io
18+
const read: typeof _.read
19+
const write: typeof _.write
20+
const template: typeof _.template
21+
const style: typeof _.style
22+
const resguard: typeof _.resguard
2523
}

0 commit comments

Comments
 (0)