tstl-simple-delete
v1.0.0
Published
TypeScriptToLua plugin that replaces calls to the TSTL `delete` function with a statement setting a value to `nil`.
Downloads
3
Readme
tstl-simple-delete
TypeScriptToLua plugin that replaces calls to the TSTL delete
function with a statement setting a value to nil
.
This repo offers an alternate implementation to the simplifyDelete
option in gb-tstl-utils.
:exclamation: Use this and any code transformation plugin with caution. Mistakes are possible.
Example
__TS__Delete(x, y)
becomes x[y] = nil
Installation
Requires TSTL >= 1.22.0.
- Install this plugin
yarn add tstl-simple-delete -D
# or
npm install tstl-simple-delete --save-dev
- Add
tstl-simple-delete
totstl.luaPlugins
intsconfig.json
{
"tstl": {
"luaPlugins": [
+ {
+ "name": "tstl-simple-delete"
+ }
],
}
}
License
CC0