Skip to content

Commit 569867e

Browse files
committed
fix(io): use different FileReadFormat per lua version
1 parent 73bc89c commit 569867e

File tree

6 files changed

+7
-2
lines changed

6 files changed

+7
-2
lines changed

core/io.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ declare namespace io {
9595
function write(...args: (string | number)[]): [LuaFile] | [undefined, string];
9696
}
9797

98-
type FileReadFormat = 'n' | 'a' | 'l' | 'L' | number;
99-
10098
interface LuaFile {
10199
/**
102100
* Closes file. Note that files are automatically closed when their handles are garbage collected, but that takes an unpredictable amount of time to happen.

special/5.1-only.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,5 @@ declare namespace debug {
7171
/** @tupleReturn */
7272
function getlocal(thread: LuaThread, level: number, local: number): [string, any];
7373
}
74+
75+
type FileReadFormat = '*n' | '*a' | '*l' | number;

special/5.2-or-jit.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
type FileReadFormat = '*n' | '*a' | '*l' | '*L' | number;

special/5.2.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import './5.2-only';
2+
import './5.2-or-jit';
23
import './5.2-plus';
34
import './5.2-plus-or-jit';
45
import './5.3-pre';

special/5.3-plus.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,3 +170,5 @@ interface LuaMetatable<T> {
170170
*/
171171
__shr?(this: T, operand: any): any;
172172
}
173+
174+
type FileReadFormat = 'n' | 'a' | 'l' | 'L' | number;

special/jit.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import './5.1-or-jit';
2+
import './5.2-or-jit';
23
import './5.2-plus-or-jit';
34
import './5.3-pre';
45
import './5.4-pre';

0 commit comments

Comments
 (0)