diff --git a/README.md b/README.md index 44c6e82f4..bb61a0b6a 100644 --- a/README.md +++ b/README.md @@ -160,6 +160,10 @@ Then, the tests can be executed: npm test +To test the type definitions: + + npm run test:types + Additionally, the tests can be run on FireFox using [headless mode](https://developer.mozilla.org/en-US/Firefox/Headless_mode): npm run test:browser diff --git a/types/EXPLANATION.md b/types/EXPLANATION.md index 0bcb7b0ba..8f83778aa 100644 --- a/types/EXPLANATION.md +++ b/types/EXPLANATION.md @@ -1,6 +1,6 @@ # Mathjs TypeScript types -The code base of Mathjs is writting in JavaScript. The TypeScript definitions are maintained separately. +The code base of Mathjs is written in JavaScript. The TypeScript definitions are maintained separately. ## Library structure @@ -52,3 +52,15 @@ export const { // ... } : Record ``` + +## Testing the type definitions + +The types are defined in `types/index.d.ts`. + +The tests for the type definitions are located in `test/typescript-types/testTypes.ts`. + +To run the tests for the type definitions: + +``` +npm run test:types +```