@gwigz/slua-types 0.1.0
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 +37 -0
- package/index.d.ts +5322 -0
- package/package.json +19 -0
package/README.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# `@gwigz/slua-types`
|
|
2
|
+
|
|
3
|
+
Auto-generated TypeScript declarations for SLua and LSL APIs.
|
|
4
|
+
|
|
5
|
+
Provides full type coverage for:
|
|
6
|
+
|
|
7
|
+
- **Base types** - `Vector`, `Quaternion`, `UUID`, `DetectedEvent` with operator overloads
|
|
8
|
+
- **Constructors** - `new Vector(x, y, z)` compiles to `vector.create(x, y, z)`
|
|
9
|
+
- **Modules** - `vector`, `quaternion`, `math`, `string`, `table`, `bit32`, `buffer`, `coroutine`, `uuid`
|
|
10
|
+
- **LSL functions** - 750+ `ll.*` functions with full parameter and return types
|
|
11
|
+
- **LSL constants** - `AGENT`, `ACTIVE`, `PI`, etc.
|
|
12
|
+
- **Events** - `LLEvents.on("touch_start", ...)` with typed event name unions
|
|
13
|
+
- **Globals** - `print`, `tostring`, `tonumber`, `assert`, `touuid`, `tovector`, etc.
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
Reference directly in your TypeScript file:
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
/// <reference path="path/to/index.d.ts" />
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Or include via `tsconfig.json`:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"include": ["node_modules/@gwigz/slua-types/index.d.ts"]
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Regenerating
|
|
32
|
+
|
|
33
|
+
Types are generated from `refs/lsl-definitions/*.yaml` by the `gen-types` tool:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
bun run generate
|
|
37
|
+
```
|