Scala is a strong statically typed general-purpose programming language which supports both object-oriented programming and functional programming.
Its standard library provides many types and data structures that make developers' life much easier and help write more functional, elegant and concise code.
Unfortunately, when it comes to web development (specially frontend development) there are no such convenient features. So, this is an attempt to provide Scala's most used and useful types and data structures for Typescript.
You can access the npm
page of the library here.
To install the npm
library in your typescript project just use the following command:
npm i scala-types
The recommended configuration for your tsconfig.json
is:
{
"compilerOptions": {
"esModuleInterop": true,
"module": "ES6",
"target": "ES6",
"moduleResolution": "node"
}
}
Finally, you can just import and use the types you need in your project.
The library is released and distributed under the MIT License.
To suggest the introduction of other Scala types or new features for the ones that are already implemented, please open an issue.
If you feel like contributing yourself to the library, please make sure you follow these steps:
- fork the repository;
- implement the feature you like;
- write documentation for the feature;
- test the features;
- make a pull request so that the feature can be merged into the main repository.
Please, note that for pull requests to be merged the coverage must not be lower than 90%.