https://github.com/mgred/quickjs-types
TypeScript definitions for the QuickJS Engine!
https://github.com/mgred/quickjs-types
quickjs typescript
Last synced: 9 months ago
JSON representation
TypeScript definitions for the QuickJS Engine!
- Host: GitHub
- URL: https://github.com/mgred/quickjs-types
- Owner: mgred
- License: gpl-3.0
- Created: 2021-07-17T16:56:46.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-02-27T09:48:11.000Z (almost 2 years ago)
- Last Synced: 2025-04-16T22:09:14.077Z (9 months ago)
- Topics: quickjs, typescript
- Language: Makefile
- Homepage: https://mgred.github.io/quickjs-types/
- Size: 42 KB
- Stars: 16
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# QuickJS Types
> TypeScript definitions for the QuickJS Engine!
[](https://github.com/mgred/quickjs-types/actions/workflows/build_page.yaml)
[](https://www.gnu.org/licenses/gpl-3.0.en.html)
## Usage
### Node
Add using a package manager, e.g.: npm
```bash
npm i -D quickjs-types
```
Add types to `tsconfig.json`:
```json
{
"compilerOptions": {
"types": ["quickjs-types"]
}
}
```
### Git Submodule
Add a submodule to a project, e.g. `types/quickjs`:
```bash
git submodule add git@github.com:mgred/quickjs-types.git types/quickjs
```
Extend `tsconfig.json` to use types:
```json
{
"compilerOptions": {
"typeRoots": ["types"]
}
}
```
## Tests
All tests live in `test.ts`.
To verify everyting passes, run:
```bash
tsc -p .
```
## License
Code in this repository is licensed under the [GNU General Public License v3](https://www.gnu.org/licenses/gpl-3.0.en.html)
## Todos
- [ ] Add more tests
- [ ] Add more documentation (comments)