Skip to content

Commit 1b5270e

Browse files
committed
Fixed Lua constant not being transfered to js
1 parent 2dc2f84 commit 1b5270e

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"postversion": "git push && git push --tags"
2121
},
2222
"author": "Lorenz Junglas (Lolleko)",
23+
"repository": "https://github.com/TypeScriptToLua/lua-wasm-bindings",
2324
"license": "MIT",
2425
"devDependencies": {
2526
"@types/emscripten": "^1.39.4",

src/binding-factory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function createLua(glue: LuaEmscriptenModule, overrides: Partial<Lua>): L
2828

2929
/** @internal */
3030
export function createLauxLib(glue: LuaEmscriptenModule, lua: Lua, overrides: Partial<LauxLib>): LauxLib {
31-
const defaultLauxLib = {
31+
const defaultLauxLib: LauxLib = {
3232
// In C this is just a #define so we have to recreate it ourself
3333
luaL_dostring: function (L: LuaState, s: string) {
3434
return this.luaL_loadstring(L, s) || lua.lua_pcall(L, 0, LUA_MULTRET, 0);

src/lua.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ interface LuaStateUnique {
44
export type LuaState = number & LuaStateUnique;
55

66
// For usage in call and pcall
7-
export declare const LUA_MULTRET = -1;
7+
export const LUA_MULTRET = -1;
88

99
// Thread Status Codes
10-
export declare const LUA_OK = 0;
11-
export declare const LUA_YIELD = 1;
12-
export declare const LUA_ERRRUN = 2;
13-
export declare const LUA_ERRSYNTAX = 3;
14-
export declare const LUA_ERRMEM = 4;
15-
export declare const LUA_ERRERR = 5;
10+
export const LUA_OK = 0;
11+
export const LUA_YIELD = 1;
12+
export const LUA_ERRRUN = 2;
13+
export const LUA_ERRSYNTAX = 3;
14+
export const LUA_ERRMEM = 4;
15+
export const LUA_ERRERR = 5;
1616

1717
export interface Lua {
1818
lua_close(L: LuaState): void;

0 commit comments

Comments
 (0)