Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thinknathan/tstl-simple-delete
TypeScriptToLua plugin that replaces calls to the TSTL `delete` function with a statement setting a value to `nil`.
https://github.com/thinknathan/tstl-simple-delete
lua tstl tstl-extension tstl-plugin typescript
Last synced: 6 days ago
JSON representation
TypeScriptToLua plugin that replaces calls to the TSTL `delete` function with a statement setting a value to `nil`.
- Host: GitHub
- URL: https://github.com/thinknathan/tstl-simple-delete
- Owner: thinknathan
- License: cc0-1.0
- Created: 2024-06-28T00:45:01.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-01T18:47:14.000Z (about 1 month ago)
- Last Synced: 2024-10-02T09:38:38.722Z (about 1 month ago)
- Topics: lua, tstl, tstl-extension, tstl-plugin, typescript
- Language: TypeScript
- Homepage:
- Size: 783 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tstl-simple-delete
[![CI](https://github.com/thinknathan/tstl-simple-delete/actions/workflows/ci.yml/badge.svg)](https://github.com/thinknathan/tstl-simple-delete/actions/workflows/ci.yml) ![GitHub License](https://img.shields.io/github/license/thinknathan/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](https://www.npmjs.com/package/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.
1. Install this plugin
```bash
yarn add tstl-simple-delete -D
# or
npm install tstl-simple-delete --save-dev
```2. Add `tstl-simple-delete` to `tstl.luaPlugins` in `tsconfig.json`
```diff
{
"tstl": {
"luaPlugins": [
+ {
+ "name": "tstl-simple-delete"
+ }
],
}
}
```## License
CC0