About
With this Library for typescript-to-lua you can write add-ons for Lua in TypeScript. That means you can see your errors in your favorite IDE like Visual Studio Code, Sublime, or whatever. This also makes finding errors in your code easier because of how TypeScript works. The types are open source on my GitHub page so you can also help me to fix or add features.
Installation
To install it you can use
or
Then I recommend copying the
Usage
Now you can use it as any TypeScript Library and code away. But that's not really easy: There are some things, that currently don't work (yet):
Classes cannot be defined. It uses a Wrapper from typescript-to-lua but using those wrappers makes SRB2 not very happy. So that's why before you use the Lua file, check if there are any functions/variables that you didn't define or aren't in the standard of Lua or SRB2. For now, use an interface and a function.
If you have questions, you can ask me on Discord (
With this Library for typescript-to-lua you can write add-ons for Lua in TypeScript. That means you can see your errors in your favorite IDE like Visual Studio Code, Sublime, or whatever. This also makes finding errors in your code easier because of how TypeScript works. The types are open source on my GitHub page so you can also help me to fix or add features.
Installation
To install it you can use
npm
or yarn
to install it as a dependency:npm install https://github.com/N1ghtTheF0x/srb2-ts.git
or
yarn add https://github.com/N1ghtTheF0x/srb2-ts.git
Then I recommend copying the
tsconfig.json
from node_modules/srb2-ts
and adding to the configuration a bundle entry and output (See more here). you may need to add "srb2-ts" to the types
property in the config.Usage
Now you can use it as any TypeScript Library and code away. But that's not really easy: There are some things, that currently don't work (yet):
Classes cannot be defined. It uses a Wrapper from typescript-to-lua but using those wrappers makes SRB2 not very happy. So that's why before you use the Lua file, check if there are any functions/variables that you didn't define or aren't in the standard of Lua or SRB2. For now, use an interface and a function.
If you have questions, you can ask me on Discord (
Night The Fox#2013
) for help. Anyways happy coding, I guess.