https://github.com/pavi2410/stronglytyped
https://github.com/pavi2410/stronglytyped
javascript js strongly-typed
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pavi2410/stronglytyped
- Owner: pavi2410
- License: mit
- Created: 2021-04-22T08:14:00.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-07T09:10:31.000Z (about 4 years ago)
- Last Synced: 2025-01-28T00:30:58.789Z (8 months ago)
- Topics: javascript, js, strongly-typed
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# StronglyTyped
StronglyTyped is an experiment to introduce strong-typed variables to JS. Its goal is to offer type safety through the direct use of pure JS syntax. It uses Proxy to make this magic happen!
## Syntax
- Declare a typed variable
```
let var_name = mutableVar(type, value)
```
- Access the value
```
var_name._
```
- Mutate the variable
```
var_name._ = some_value
```## Known Limitations
- I have only tested it using primitives. I am not sure whether it works for Objects.


