Skip to content

Commit 3f4fa2b

Browse files
authored
Merge pull request #9 from KlutzyBubbles/master
Big changes, that were actually tested
2 parents 34996b3 + 8ba4f6e commit 3f4fa2b

31 files changed

+1282
-838
lines changed

package-lock.json

Lines changed: 23 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,8 @@
3939
"tsx": "^3.12.6",
4040
"typescript": "^5.0.2",
4141
"typescript-to-lua": "^1.14.0"
42+
},
43+
"dependencies": {
44+
"@typescript-to-lua/language-extensions": "^1.19.0"
4245
}
4346
}

src/index.ts

Lines changed: 0 additions & 38 deletions
This file was deleted.

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"lib": ["EsNext"],
88
//"noEmit": true,
99
"esModuleInterop": true,
10-
"allowSyntheticDefaultImports": true
10+
"allowSyntheticDefaultImports": true,
11+
"types": ["@typescript-to-lua/language-extensions"]
1112
},
1213
"tstl": {
1314
"luaTarget": "5.2"

types/backgrounds.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,30 @@ interface BackgroundsConstructor {
99
*
1010
* @return {string} The current background name.
1111
*/
12-
getBackground: (this: void) => string;
12+
getBackground(this: void): string;
1313

1414
/**
1515
* Returns the image URL of the current custom background, or nil if the current background is not custom.
1616
*
1717
* @return {string} The image URL of the current custom background, or nil if the current background is not custom.
1818
*/
19-
getCustomURL: (this: void) => string;
19+
getCustomURL(this: void): string | undefined;
2020

2121
/**
2222
* Replaces the current background with the background matching the specified name.
2323
*
2424
* @param {string} name The name of the background to set.
2525
* @return {boolean} True if the background was set successfully, false otherwise.
2626
*/
27-
setBackground: (this: void, name: string) => boolean;
27+
setBackground(this: void, name: string): boolean;
2828

2929
/**
3030
* Replaces the current background with a custom background loaded from the specified url.
3131
*
3232
* @param {string} url The url of the image to use as the background.
3333
* @return {boolean} True if the background was set successfully, false otherwise.
3434
*/
35-
setCustomURL: (this: void, url: string) => boolean;
35+
setCustomURL(this: void, url: string): boolean;
3636
}
3737

3838
/**

0 commit comments

Comments
 (0)