luau2ts 0.2.2 → 0.2.3
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/dist/cli/args.d.ts +23 -0
- package/dist/cli/args.d.ts.map +1 -0
- package/dist/cli/args.js +177 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/bin.d.ts +3 -0
- package/dist/cli/bin.d.ts.map +1 -0
- package/dist/cli/bin.js +71 -0
- package/dist/cli/bin.js.map +1 -0
- package/dist/cli/modes.d.ts +20 -0
- package/dist/cli/modes.d.ts.map +1 -0
- package/dist/cli/modes.js +145 -0
- package/dist/cli/modes.js.map +1 -0
- package/dist/compile/class-shape.d.ts +31 -0
- package/dist/compile/class-shape.d.ts.map +1 -0
- package/dist/compile/class-shape.js +291 -0
- package/dist/compile/class-shape.js.map +1 -0
- package/dist/compile/context.d.ts +86 -0
- package/dist/compile/context.d.ts.map +1 -0
- package/dist/compile/context.js +144 -0
- package/dist/compile/context.js.map +1 -0
- package/dist/compile/index.d.ts +58 -0
- package/dist/compile/index.d.ts.map +1 -0
- package/dist/compile/index.js +2155 -0
- package/dist/compile/index.js.map +1 -0
- package/dist/compile/macros/datatypes.d.ts +2 -0
- package/dist/compile/macros/datatypes.d.ts.map +1 -0
- package/dist/compile/macros/datatypes.js +76 -0
- package/dist/compile/macros/datatypes.js.map +1 -0
- package/dist/compile/macros/index.d.ts +33 -0
- package/dist/compile/macros/index.d.ts.map +1 -0
- package/dist/compile/macros/index.js +71 -0
- package/dist/compile/macros/index.js.map +1 -0
- package/dist/compile/macros/instance.d.ts +2 -0
- package/dist/compile/macros/instance.d.ts.map +1 -0
- package/dist/compile/macros/instance.js +58 -0
- package/dist/compile/macros/instance.js.map +1 -0
- package/dist/compile/macros/stdlib.d.ts +2 -0
- package/dist/compile/macros/stdlib.d.ts.map +1 -0
- package/dist/compile/macros/stdlib.js +140 -0
- package/dist/compile/macros/stdlib.js.map +1 -0
- package/dist/compile/rbxts-runtime.d.ts +2 -0
- package/dist/compile/rbxts-runtime.d.ts.map +1 -0
- package/dist/compile/rbxts-runtime.js +163 -0
- package/dist/compile/rbxts-runtime.js.map +1 -0
- package/dist/compile/sourcemap.d.ts +25 -0
- package/dist/compile/sourcemap.d.ts.map +1 -0
- package/dist/compile/sourcemap.js +71 -0
- package/dist/compile/sourcemap.js.map +1 -0
- package/dist/compile/type.d.ts +6 -0
- package/dist/compile/type.d.ts.map +1 -0
- package/dist/compile/type.js +122 -0
- package/dist/compile/type.js.map +1 -0
- package/dist/compile/util.d.ts +38 -0
- package/dist/compile/util.d.ts.map +1 -0
- package/dist/compile/util.js +153 -0
- package/dist/compile/util.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/parser/index.d.ts +4 -0
- package/dist/parser/index.d.ts.map +1 -0
- package/dist/parser/index.js +227 -0
- package/dist/parser/index.js.map +1 -0
- package/dist/parser/types.d.ts +430 -0
- package/dist/parser/types.d.ts.map +1 -0
- package/dist/parser/types.js +14 -0
- package/dist/parser/types.js.map +1 -0
- package/dist/parser/wasm/luau-parser.d.mts +21 -0
- package/dist/parser/wasm/luau-parser.mjs +2 -0
- package/dist/parser/wasm/luau-parser.wasm +0 -0
- package/dist/rojo/index.d.ts +4 -0
- package/dist/rojo/index.d.ts.map +1 -0
- package/dist/rojo/index.js +3 -0
- package/dist/rojo/index.js.map +1 -0
- package/dist/rojo/load-project.d.ts +12 -0
- package/dist/rojo/load-project.d.ts.map +1 -0
- package/dist/rojo/load-project.js +35 -0
- package/dist/rojo/load-project.js.map +1 -0
- package/dist/rojo/types.d.ts +39 -0
- package/dist/rojo/types.d.ts.map +1 -0
- package/dist/rojo/types.js +2 -0
- package/dist/rojo/types.js.map +1 -0
- package/dist/rojo/walk-tree.d.ts +40 -0
- package/dist/rojo/walk-tree.d.ts.map +1 -0
- package/dist/rojo/walk-tree.js +164 -0
- package/dist/rojo/walk-tree.js.map +1 -0
- package/dist/runtime/arith.d.ts +13 -0
- package/dist/runtime/arith.d.ts.map +1 -0
- package/dist/runtime/arith.js +151 -0
- package/dist/runtime/arith.js.map +1 -0
- package/dist/runtime/index-helper.d.ts +3 -0
- package/dist/runtime/index-helper.d.ts.map +1 -0
- package/dist/runtime/index-helper.js +40 -0
- package/dist/runtime/index-helper.js.map +1 -0
- package/dist/runtime/index.d.ts +13 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +13 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/iterator.d.ts +58 -0
- package/dist/runtime/iterator.d.ts.map +1 -0
- package/dist/runtime/iterator.js +181 -0
- package/dist/runtime/iterator.js.map +1 -0
- package/dist/runtime/length.d.ts +2 -0
- package/dist/runtime/length.d.ts.map +1 -0
- package/dist/runtime/length.js +15 -0
- package/dist/runtime/length.js.map +1 -0
- package/dist/runtime/lua-stdlib.d.ts +186 -0
- package/dist/runtime/lua-stdlib.d.ts.map +1 -0
- package/dist/runtime/lua-stdlib.js +502 -0
- package/dist/runtime/lua-stdlib.js.map +1 -0
- package/dist/runtime/metatable.d.ts +16 -0
- package/dist/runtime/metatable.d.ts.map +1 -0
- package/dist/runtime/metatable.js +129 -0
- package/dist/runtime/metatable.js.map +1 -0
- package/dist/runtime/pattern.d.ts +21 -0
- package/dist/runtime/pattern.d.ts.map +1 -0
- package/dist/runtime/pattern.js +375 -0
- package/dist/runtime/pattern.js.map +1 -0
- package/dist/runtime/pcall.d.ts +12 -0
- package/dist/runtime/pcall.d.ts.map +1 -0
- package/dist/runtime/pcall.js +54 -0
- package/dist/runtime/pcall.js.map +1 -0
- package/dist/runtime/string-lib.d.ts +31 -0
- package/dist/runtime/string-lib.d.ts.map +1 -0
- package/dist/runtime/string-lib.js +296 -0
- package/dist/runtime/string-lib.js.map +1 -0
- package/dist/runtime/table-lib.d.ts +18 -0
- package/dist/runtime/table-lib.d.ts.map +1 -0
- package/dist/runtime/table-lib.js +133 -0
- package/dist/runtime/table-lib.js.map +1 -0
- package/dist/runtime/tostring.d.ts +3 -0
- package/dist/runtime/tostring.d.ts.map +1 -0
- package/dist/runtime/tostring.js +82 -0
- package/dist/runtime/tostring.js.map +1 -0
- package/dist/runtime/truthy.d.ts +13 -0
- package/dist/runtime/truthy.d.ts.map +1 -0
- package/dist/runtime/truthy.js +26 -0
- package/dist/runtime/truthy.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
const identityReifier = (k) => k;
|
|
2
|
+
let keyReifier = identityReifier;
|
|
3
|
+
export function registerKeyReifier(fn) {
|
|
4
|
+
keyReifier = fn;
|
|
5
|
+
}
|
|
6
|
+
// Side-channel: a host runtime (e.g. a Roblox runtime that supports
|
|
7
|
+
// Instance-keyed tables) installs the reifier via globalThis on its own
|
|
8
|
+
// load. Read it through getKeyReifier so the value is picked up the
|
|
9
|
+
// moment a runtime registers, not at module load.
|
|
10
|
+
const g = globalThis;
|
|
11
|
+
function getKeyReifier() {
|
|
12
|
+
if (keyReifier === identityReifier && typeof g.__rbxKeyReifier === 'function') {
|
|
13
|
+
keyReifier = g.__rbxKeyReifier;
|
|
14
|
+
}
|
|
15
|
+
return keyReifier;
|
|
16
|
+
}
|
|
17
|
+
export function ipairs(t) {
|
|
18
|
+
return [ipairsIter, (t ?? []), 0];
|
|
19
|
+
}
|
|
20
|
+
function ipairsIter(state, i) {
|
|
21
|
+
if (state == null)
|
|
22
|
+
return undefined;
|
|
23
|
+
const next = i + 1;
|
|
24
|
+
// 1-indexed: state[next - 1] is Lua index `next`.
|
|
25
|
+
const value = state[next - 1];
|
|
26
|
+
if (value === undefined || value === null)
|
|
27
|
+
return undefined;
|
|
28
|
+
return [next, value];
|
|
29
|
+
}
|
|
30
|
+
export function pairs(t) {
|
|
31
|
+
return [pairsIter, (t ?? {}), null];
|
|
32
|
+
}
|
|
33
|
+
// Lua's `next(t, k)` — returns the key/value pair following `k` (or the first
|
|
34
|
+
// pair when `k` is nil), or nil when there is no successor. The dominant idiom
|
|
35
|
+
// in Lua libraries is `next(t) == nil` to test emptiness; we support both
|
|
36
|
+
// shapes. Returned as a JS array so destructuring `[k, v] = next(t)` works.
|
|
37
|
+
export function next(t, k = null) {
|
|
38
|
+
return pairsIter(t, k);
|
|
39
|
+
}
|
|
40
|
+
function pairsIter(state, prev) {
|
|
41
|
+
if (state == null)
|
|
42
|
+
return undefined;
|
|
43
|
+
// pairs() iterates every key — numeric AND string. JS arrays can carry
|
|
44
|
+
// string-keyed properties (Lua scripts that index a table with an
|
|
45
|
+
// Instance hit this path), so we have to consult Object.keys plus the
|
|
46
|
+
// numeric array length. Without the array slice, an `offsets[part] = X`
|
|
47
|
+
// pattern on an array-backed Lua table iterates zero times.
|
|
48
|
+
const keys = orderedRawPairKeys(state);
|
|
49
|
+
let idx = 0;
|
|
50
|
+
if (prev !== null) {
|
|
51
|
+
// For Instance-keyed tables, prev is the reified value (e.g. an
|
|
52
|
+
// Instance) but `keys` is the raw string list. Convert prev to its
|
|
53
|
+
// string form for comparison.
|
|
54
|
+
const prevStr = typeof prev === 'object' && prev !== null ? String(prev) : prev;
|
|
55
|
+
idx = keys.findIndex((k) => k === prevStr) + 1;
|
|
56
|
+
}
|
|
57
|
+
while (idx < keys.length) {
|
|
58
|
+
const rawKey = keys[idx];
|
|
59
|
+
const lookupKey = Array.isArray(state) && typeof rawKey === 'number' ? rawKey - 1 : rawKey;
|
|
60
|
+
const value = state[lookupKey];
|
|
61
|
+
if (value !== undefined && value !== null) {
|
|
62
|
+
return [getKeyReifier()(rawKey), value];
|
|
63
|
+
}
|
|
64
|
+
idx += 1;
|
|
65
|
+
}
|
|
66
|
+
return undefined;
|
|
67
|
+
}
|
|
68
|
+
function orderedRawPairKeys(state) {
|
|
69
|
+
const numericStringKeys = Object.keys(state)
|
|
70
|
+
.filter((k) => /^\d+$/.test(k))
|
|
71
|
+
.map((k) => Number(k))
|
|
72
|
+
.sort((a, b) => a - b);
|
|
73
|
+
const stringKeys = Object.keys(state).filter((k) => !/^\d+$/.test(k)).sort();
|
|
74
|
+
if (!Array.isArray(state))
|
|
75
|
+
return [...numericStringKeys, ...stringKeys];
|
|
76
|
+
const numericKeys = state.map((_, i) => i + 1);
|
|
77
|
+
return [...numericKeys, ...stringKeys];
|
|
78
|
+
}
|
|
79
|
+
/** Generic-for protocol adapter. Luau lets you write
|
|
80
|
+
* `for k, v in expr do … end` where `expr` can be any of:
|
|
81
|
+
* - an iterator triple `(iterFn, state, initialCtrl)` returned by
|
|
82
|
+
* `pairs(t)` / `ipairs(t)` / custom iterator constructors,
|
|
83
|
+
* - a callable that mimics the iterator function directly,
|
|
84
|
+
* - a table with an `__iter` metamethod,
|
|
85
|
+
* - a plain array (Luau extension — common in Roblox code like
|
|
86
|
+
* `for _, x in CollectionService:GetTagged("Tag") do`),
|
|
87
|
+
* - a plain dictionary (Luau extension; same as `pairs(t)`).
|
|
88
|
+
*
|
|
89
|
+
* The compiler used to emit a raw `[__iter, __state, __ctrl] = expr`
|
|
90
|
+
* destructure that only worked for the triple form. Arrays and bare
|
|
91
|
+
* tables silently iterated zero times because the first element
|
|
92
|
+
* wasn't a function. This adapter normalizes every shape to a real
|
|
93
|
+
* triple. */
|
|
94
|
+
export function genericIter(value) {
|
|
95
|
+
if (value == null) {
|
|
96
|
+
return [emptyIter, null, null];
|
|
97
|
+
}
|
|
98
|
+
if (typeof value === 'function') {
|
|
99
|
+
return [value, null, null];
|
|
100
|
+
}
|
|
101
|
+
if (Array.isArray(value)) {
|
|
102
|
+
const [maybeIter, maybeState, maybeCtrl] = value;
|
|
103
|
+
if (typeof maybeIter === 'function') {
|
|
104
|
+
// Already a triple: pairs(t) / ipairs(t) / custom iterator.
|
|
105
|
+
return [
|
|
106
|
+
maybeIter,
|
|
107
|
+
maybeState ?? null,
|
|
108
|
+
maybeCtrl ?? null,
|
|
109
|
+
];
|
|
110
|
+
}
|
|
111
|
+
// Plain JS array. Iterate as ipairs would.
|
|
112
|
+
return [ipairsIter, value, 0];
|
|
113
|
+
}
|
|
114
|
+
if (typeof value === 'object') {
|
|
115
|
+
const obj = value;
|
|
116
|
+
if (typeof obj.__iter === 'function') {
|
|
117
|
+
const triple = obj.__iter();
|
|
118
|
+
if (Array.isArray(triple) && typeof triple[0] === 'function') {
|
|
119
|
+
return [
|
|
120
|
+
triple[0],
|
|
121
|
+
triple[1] ?? null,
|
|
122
|
+
triple[2] ?? null,
|
|
123
|
+
];
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return [pairsIter, value, null];
|
|
127
|
+
}
|
|
128
|
+
return [emptyIter, null, null];
|
|
129
|
+
}
|
|
130
|
+
function emptyIter() {
|
|
131
|
+
return undefined;
|
|
132
|
+
}
|
|
133
|
+
/** Multi-return adapter for `local a, b = f()` where `f` returns a single
|
|
134
|
+
* value (not a tuple). Luau pads missing returns with nil; JS destructuring
|
|
135
|
+
* on a non-iterable throws. Wrap the call result so destructuring works:
|
|
136
|
+
* `[a, b] = multiret(f())` → `a = result`, `b = undefined` when `f` returns
|
|
137
|
+
* a non-array, and stays a no-op when `f` already returns an array tuple. */
|
|
138
|
+
export function multiret(v) {
|
|
139
|
+
return Array.isArray(v) ? v : [v];
|
|
140
|
+
}
|
|
141
|
+
/** Drop-in replacement for `Object.keys(t)` for the compiler's inlined
|
|
142
|
+
* `for k in pairs(t)` form. Returns the original Instance object as the
|
|
143
|
+
* key when the table was indexed with one, via the global key reifier
|
|
144
|
+
* a host Roblox runtime installs. Without this, Instance-keyed
|
|
145
|
+
* Lua tables collapse on shared Name (two parts named "Handle" share
|
|
146
|
+
* the same string key) AND iteration yields the string key, so
|
|
147
|
+
* `part.CFrame = ...` fails with "Cannot create property on string".
|
|
148
|
+
*
|
|
149
|
+
* Falls back to the raw string for primitive keys and for the slow
|
|
150
|
+
* path before the runtime has loaded. */
|
|
151
|
+
export function pairKeys(t) {
|
|
152
|
+
if (t == null || typeof t !== 'object')
|
|
153
|
+
return [];
|
|
154
|
+
const reifier = getKeyReifier();
|
|
155
|
+
const out = [];
|
|
156
|
+
// Mixed arrays: include numeric indices first (Lua 1-based), then
|
|
157
|
+
// string-keyed properties. Array.isArray + Object.keys may overlap,
|
|
158
|
+
// so check the raw key for digit-only and emit the numeric form.
|
|
159
|
+
for (const k of orderedRawPairKeys(t)) {
|
|
160
|
+
if (typeof k === 'number') {
|
|
161
|
+
out.push(k);
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
out.push(reifier(k));
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return out;
|
|
168
|
+
}
|
|
169
|
+
/** Companion lookup: `t[k]` where k may be a reified Instance. We use
|
|
170
|
+
* String(k) to recover the original property key. For numeric keys the
|
|
171
|
+
* compiler emits `t[k-1]` directly, so we only handle the reified case. */
|
|
172
|
+
export function pairValue(t, k) {
|
|
173
|
+
if (t == null || typeof t !== 'object')
|
|
174
|
+
return undefined;
|
|
175
|
+
const key = typeof k === 'object' && k !== null ? String(k) : k;
|
|
176
|
+
if (Array.isArray(t) && typeof key === 'number') {
|
|
177
|
+
return t[key - 1];
|
|
178
|
+
}
|
|
179
|
+
return t[key];
|
|
180
|
+
}
|
|
181
|
+
//# sourceMappingURL=iterator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iterator.js","sourceRoot":"","sources":["../../src/runtime/iterator.ts"],"names":[],"mappings":"AACA,MAAM,eAAe,GAAe,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAC7C,IAAI,UAAU,GAAe,eAAe,CAAC;AAC7C,MAAM,UAAU,kBAAkB,CAAC,EAAc;IAC/C,UAAU,GAAG,EAAE,CAAC;AAClB,CAAC;AACD,oEAAoE;AACpE,wEAAwE;AACxE,oEAAoE;AACpE,kDAAkD;AAClD,MAAM,CAAC,GAAG,UAAyD,CAAC;AACpE,SAAS,aAAa;IACpB,IAAI,UAAU,KAAK,eAAe,IAAI,OAAO,CAAC,CAAC,eAAe,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AAC;QACd,CAAC;aAAM,CAAC;YACN,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;4EAE4E;AAC5E,MAAM,UAAU,SAAS,CAAC,CAAU,EAAE,CAAU;IAC9C,IAAI,CAAC,IAAI,IAAI,IAAI,OAAO,CAAC,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IACzD,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,CAAqB,CAAC;IACrF,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAChD,OAAQ,CAAe,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;IACnC,CAAC;IACD,OAAQ,CAAsC,CAAC,GAAsB,CAAC,CAAC;AACzE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"length.d.ts","sourceRoot":"","sources":["../../src/runtime/length.ts"],"names":[],"mappings":"AAAA,wBAAgB,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAa7C"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function lualen(value) {
|
|
2
|
+
if (typeof value === 'string') {
|
|
3
|
+
return new TextEncoder().encode(value).length;
|
|
4
|
+
}
|
|
5
|
+
if (Array.isArray(value)) {
|
|
6
|
+
return value.length;
|
|
7
|
+
}
|
|
8
|
+
if (value && typeof value === 'object') {
|
|
9
|
+
// For string-keyed plain objects (used to represent string-keyed Lua
|
|
10
|
+
// tables), Lua's # returns 0. Same here.
|
|
11
|
+
return 0;
|
|
12
|
+
}
|
|
13
|
+
throw new TypeError(`attempt to get length of a ${typeof value} value`);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=length.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"length.js","sourceRoot":"","sources":["../../src/runtime/length.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,MAAM,CAAC,KAAc;IACnC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;IAChD,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC,MAAM,CAAC;IACtB,CAAC;IACD,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACvC,qEAAqE;QACrE,yCAAyC;QACzC,OAAO,CAAC,CAAC;IACX,CAAC;IACD,MAAM,IAAI,SAAS,CAAC,8BAA8B,OAAO,KAAK,QAAQ,CAAC,CAAC;AAC1E,CAAC"}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { stringByte, stringChar, stringFind, stringFormat, stringGmatch, stringGsub, stringLen, stringLower, stringMatch, stringRep, stringReverse, stringSub, stringUpper } from './string-lib.js';
|
|
2
|
+
import { tableClear, tableClone, tableConcat, tableFind, tableFreeze, tableInsert, tableIsFrozen, tableMaxn, tableMove, tablePack, tableRemove, tableSort, tableUnpack } from './table-lib.js';
|
|
3
|
+
declare function stringSplit(s: string, sep?: string): string[];
|
|
4
|
+
export declare const string: {
|
|
5
|
+
readonly byte: typeof stringByte;
|
|
6
|
+
readonly char: typeof stringChar;
|
|
7
|
+
readonly find: typeof stringFind;
|
|
8
|
+
readonly format: typeof stringFormat;
|
|
9
|
+
readonly gmatch: typeof stringGmatch;
|
|
10
|
+
readonly gsub: typeof stringGsub;
|
|
11
|
+
readonly len: typeof stringLen;
|
|
12
|
+
readonly lower: typeof stringLower;
|
|
13
|
+
readonly match: typeof stringMatch;
|
|
14
|
+
readonly rep: typeof stringRep;
|
|
15
|
+
readonly reverse: typeof stringReverse;
|
|
16
|
+
readonly sub: typeof stringSub;
|
|
17
|
+
readonly upper: typeof stringUpper;
|
|
18
|
+
readonly split: typeof stringSplit;
|
|
19
|
+
readonly pack: (..._args: unknown[]) => string;
|
|
20
|
+
readonly unpack: (..._args: unknown[]) => unknown[];
|
|
21
|
+
readonly packsize: (_fmt: string) => number;
|
|
22
|
+
};
|
|
23
|
+
export declare const table: {
|
|
24
|
+
readonly insert: typeof tableInsert;
|
|
25
|
+
readonly remove: typeof tableRemove;
|
|
26
|
+
readonly concat: typeof tableConcat;
|
|
27
|
+
readonly sort: typeof tableSort;
|
|
28
|
+
readonly unpack: typeof tableUnpack;
|
|
29
|
+
readonly pack: typeof tablePack;
|
|
30
|
+
readonly find: typeof tableFind;
|
|
31
|
+
readonly clear: typeof tableClear;
|
|
32
|
+
readonly clone: typeof tableClone;
|
|
33
|
+
readonly freeze: typeof tableFreeze;
|
|
34
|
+
readonly isfrozen: typeof tableIsFrozen;
|
|
35
|
+
readonly move: typeof tableMove;
|
|
36
|
+
readonly maxn: typeof tableMaxn;
|
|
37
|
+
readonly create: <T>(count: number, value?: T) => T[];
|
|
38
|
+
readonly foreach: <T>(t: Record<string, T>, fn: (k: string, v: T) => void) => void;
|
|
39
|
+
readonly foreachi: <T>(t: T[], fn: (i: number, v: T) => void) => void;
|
|
40
|
+
readonly getn: <T>(t: T[]) => number;
|
|
41
|
+
};
|
|
42
|
+
declare function _mathRandom(m?: number, n?: number): number;
|
|
43
|
+
declare function _mathRandomSeed(seed?: number): void;
|
|
44
|
+
export declare const math: {
|
|
45
|
+
readonly abs: (x: number) => number;
|
|
46
|
+
readonly acos: (x: number) => number;
|
|
47
|
+
readonly asin: (x: number) => number;
|
|
48
|
+
readonly atan: (x: number) => number;
|
|
49
|
+
readonly atan2: (y: number, x: number) => number;
|
|
50
|
+
readonly ceil: (x: number) => number;
|
|
51
|
+
readonly clamp: (x: number, lo: number, hi: number) => number;
|
|
52
|
+
readonly cos: (x: number) => number;
|
|
53
|
+
readonly cosh: (x: number) => number;
|
|
54
|
+
readonly deg: (x: number) => number;
|
|
55
|
+
readonly exp: (x: number) => number;
|
|
56
|
+
readonly floor: (x: number) => number;
|
|
57
|
+
readonly fmod: (x: number, y: number) => number;
|
|
58
|
+
readonly frexp: (x: number) => [number, number];
|
|
59
|
+
readonly huge: number;
|
|
60
|
+
readonly ldexp: (m: number, e: number) => number;
|
|
61
|
+
readonly log: (x: number, base?: number) => number;
|
|
62
|
+
readonly log10: (x: number) => number;
|
|
63
|
+
readonly max: (...values: number[]) => number;
|
|
64
|
+
readonly min: (...values: number[]) => number;
|
|
65
|
+
readonly modf: (x: number) => [number, number];
|
|
66
|
+
readonly noise: (x?: number, y?: number, z?: number) => number;
|
|
67
|
+
readonly pi: number;
|
|
68
|
+
readonly pow: (x: number, y: number) => number;
|
|
69
|
+
readonly rad: (x: number) => number;
|
|
70
|
+
readonly random: typeof _mathRandom;
|
|
71
|
+
readonly randomseed: typeof _mathRandomSeed;
|
|
72
|
+
readonly round: (x: number) => number;
|
|
73
|
+
readonly sign: (x: number) => number;
|
|
74
|
+
readonly sin: (x: number) => number;
|
|
75
|
+
readonly sinh: (x: number) => number;
|
|
76
|
+
readonly sqrt: (x: number) => number;
|
|
77
|
+
readonly tan: (x: number) => number;
|
|
78
|
+
readonly tanh: (x: number) => number;
|
|
79
|
+
readonly map: (x: number, inMin: number, inMax: number, outMin: number, outMax: number) => number;
|
|
80
|
+
readonly lerp: (a: number, b: number, t: number) => number;
|
|
81
|
+
};
|
|
82
|
+
declare function _osTime(t?: {
|
|
83
|
+
year?: number;
|
|
84
|
+
month?: number;
|
|
85
|
+
day?: number;
|
|
86
|
+
hour?: number;
|
|
87
|
+
min?: number;
|
|
88
|
+
sec?: number;
|
|
89
|
+
}): number;
|
|
90
|
+
declare function _osDate(format?: string, t?: number): string | Record<string, unknown>;
|
|
91
|
+
export declare const os: {
|
|
92
|
+
readonly time: typeof _osTime;
|
|
93
|
+
readonly date: typeof _osDate;
|
|
94
|
+
readonly difftime: (t2: number, t1: number) => number;
|
|
95
|
+
readonly clock: () => number;
|
|
96
|
+
readonly getenv: (_name: string) => string | null;
|
|
97
|
+
};
|
|
98
|
+
export declare const bit32: {
|
|
99
|
+
readonly band: (...args: number[]) => number;
|
|
100
|
+
readonly bor: (...args: number[]) => number;
|
|
101
|
+
readonly bxor: (...args: number[]) => number;
|
|
102
|
+
readonly bnot: (x: number) => number;
|
|
103
|
+
readonly lshift: (x: number, n: number) => number;
|
|
104
|
+
readonly rshift: (x: number, n: number) => number;
|
|
105
|
+
readonly arshift: (x: number, n: number) => number;
|
|
106
|
+
readonly btest: (...args: number[]) => boolean;
|
|
107
|
+
readonly extract: (n: number, field: number, width?: number) => number;
|
|
108
|
+
readonly replace: (n: number, v: number, field: number, width?: number) => number;
|
|
109
|
+
readonly lrotate: (n: number, i: number) => number;
|
|
110
|
+
readonly rrotate: (n: number, i: number) => number;
|
|
111
|
+
readonly countlz: (n: number) => number;
|
|
112
|
+
readonly countrz: (n: number) => number;
|
|
113
|
+
};
|
|
114
|
+
export declare const utf8: {
|
|
115
|
+
readonly charpattern: "[\0-Â-ý][-¿]*";
|
|
116
|
+
readonly char: (...codes: number[]) => string;
|
|
117
|
+
readonly codepoint: (s: string, i?: number, j?: number) => number[];
|
|
118
|
+
readonly codes: (s: string) => Generator<[number, number]>;
|
|
119
|
+
readonly len: (s: string, _i?: number, _j?: number) => number;
|
|
120
|
+
readonly offset: (_s: string, _n: number, _i?: number) => number | undefined;
|
|
121
|
+
};
|
|
122
|
+
export interface LuaBuffer {
|
|
123
|
+
__isLuaBuffer: true;
|
|
124
|
+
bytes: Uint8Array;
|
|
125
|
+
view: DataView;
|
|
126
|
+
}
|
|
127
|
+
export declare const buffer: {
|
|
128
|
+
readonly create: (size: number) => LuaBuffer;
|
|
129
|
+
readonly fromstring: (s: string) => LuaBuffer;
|
|
130
|
+
readonly tostring: (b: LuaBuffer) => string;
|
|
131
|
+
readonly len: (b: LuaBuffer) => number;
|
|
132
|
+
readonly copy: (dst: LuaBuffer, dstOff: number, src: LuaBuffer, srcOff?: number, count?: number) => void;
|
|
133
|
+
readonly fill: (b: LuaBuffer, off: number, value: number, count?: number) => void;
|
|
134
|
+
readonly readi8: (b: LuaBuffer, off: number) => number;
|
|
135
|
+
readonly readu8: (b: LuaBuffer, off: number) => number;
|
|
136
|
+
readonly readi16: (b: LuaBuffer, off: number) => number;
|
|
137
|
+
readonly readu16: (b: LuaBuffer, off: number) => number;
|
|
138
|
+
readonly readi32: (b: LuaBuffer, off: number) => number;
|
|
139
|
+
readonly readu32: (b: LuaBuffer, off: number) => number;
|
|
140
|
+
readonly readf32: (b: LuaBuffer, off: number) => number;
|
|
141
|
+
readonly readf64: (b: LuaBuffer, off: number) => number;
|
|
142
|
+
readonly writei8: (b: LuaBuffer, off: number, v: number) => void;
|
|
143
|
+
readonly writeu8: (b: LuaBuffer, off: number, v: number) => void;
|
|
144
|
+
readonly writei16: (b: LuaBuffer, off: number, v: number) => void;
|
|
145
|
+
readonly writeu16: (b: LuaBuffer, off: number, v: number) => void;
|
|
146
|
+
readonly writei32: (b: LuaBuffer, off: number, v: number) => void;
|
|
147
|
+
readonly writeu32: (b: LuaBuffer, off: number, v: number) => void;
|
|
148
|
+
readonly writef32: (b: LuaBuffer, off: number, v: number) => void;
|
|
149
|
+
readonly writef64: (b: LuaBuffer, off: number, v: number) => void;
|
|
150
|
+
readonly readstring: (b: LuaBuffer, off: number, count: number) => string;
|
|
151
|
+
readonly writestring: (b: LuaBuffer, off: number, s: string, count?: number) => void;
|
|
152
|
+
};
|
|
153
|
+
export declare const debug: {
|
|
154
|
+
readonly traceback: (message?: string, _level?: number) => string;
|
|
155
|
+
readonly getinfo: (_target: unknown, _what?: string) => Record<string, unknown>;
|
|
156
|
+
readonly profilebegin: (_label: string) => void;
|
|
157
|
+
readonly profileend: () => void;
|
|
158
|
+
readonly setmemorycategory: (_category: string) => void;
|
|
159
|
+
readonly resetmemorycategory: () => void;
|
|
160
|
+
readonly info: (..._args: unknown[]) => unknown[];
|
|
161
|
+
};
|
|
162
|
+
/** Lua's `type(v)` — returns the basic Lua type name (string/number/boolean/
|
|
163
|
+
* function/table/nil/userdata/thread). */
|
|
164
|
+
export declare function luaType(v: unknown): string;
|
|
165
|
+
/** Roblox's `typeof(v)` — returns the Roblox-specific class name for
|
|
166
|
+
* Vector3, CFrame, EnumItem, Instance, etc.; falls back to `type()` for
|
|
167
|
+
* primitives. */
|
|
168
|
+
export declare function luaTypeof(v: unknown): string;
|
|
169
|
+
/** Lua's `select(i, ...)` — `select('#', ...)` returns count; `select(n, ...)`
|
|
170
|
+
* returns `args[n], args[n+1], …`. */
|
|
171
|
+
export declare function select(i: number | '#', ...args: unknown[]): unknown;
|
|
172
|
+
/** Lua's `unpack(t, i, j)` — alias for `table.unpack`. */
|
|
173
|
+
export declare function unpack<T>(t: T[], i?: number, j?: number): T[];
|
|
174
|
+
/** Lua's `newproxy([metatable])` — creates an empty userdata with optional
|
|
175
|
+
* metatable. We approximate with a frozen empty object whose metatable is
|
|
176
|
+
* set via setmetatable elsewhere. The boolean variant adds a basic mt. */
|
|
177
|
+
export declare function newproxy(addMetatable?: boolean): object;
|
|
178
|
+
/** Roblox global tables — `_G` is shared between all scripts. */
|
|
179
|
+
export declare const _G: Record<string, unknown>;
|
|
180
|
+
/** Per-script environment — Luau scripts read it as themselves. We expose
|
|
181
|
+
* the same shared object as `_G` since we don't model per-script envs. */
|
|
182
|
+
export declare const _ENV: Record<string, unknown>;
|
|
183
|
+
/** Lua version string. Roblox runs Luau, which forks 5.1; report that. */
|
|
184
|
+
export declare const _VERSION = "Luau";
|
|
185
|
+
export {};
|
|
186
|
+
//# sourceMappingURL=lua-stdlib.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lua-stdlib.d.ts","sourceRoot":"","sources":["../../src/runtime/lua-stdlib.ts"],"names":[],"mappings":"AAAA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