Skip to content

Commit cc5c0a0

Browse files
tomblindPerryvw
authored andcommitted
removing tstl header from lib functions (#622)
fixes #610
1 parent 9a58560 commit cc5c0a0

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/lualib/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
},
1212
"tstl": {
1313
"luaLibImport": "none",
14-
"luaTarget": "5.1"
14+
"luaTarget": "5.1",
15+
"noHeader": true
1516
}
1617
}

test/unit/lualib/lualib.spec.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,11 @@ test("Object.fromEntries (Map)", () => {
142142

143143
expect(JSON.parse(result)).toEqual({ foo: "bar" });
144144
});
145+
146+
test("lualibs should not include tstl header", () => {
147+
const code = `
148+
const arr = [1, 2, 3];
149+
arr.push(4);`;
150+
151+
expect(util.transpileString(code)).not.toMatch("Generated with");
152+
});

0 commit comments

Comments
 (0)