Typescript¶
Lesgo! can be integrated with a TS code-base.
Installation¶
To enable typescript for Lesgo!, follow the steps below.
-
Install @types package
npm install -D @types/lesgo
-
Rename
jsconfig.json
totsconfig.json
and verify contents to have these:{ "compilerOptions": { ... "paths": { ... "Exceptions/*": [ ... "node_modules/@types/lesgo/exceptions/*" ], "Middlewares/*": [ ... "node_modules/@types/lesgo/middlewares/*" ], "Services/*": [ ... "node_modules/@types/lesgo/services/*" ], "Utils/*": [ ... "node_modules/@types/lesgo/utils/*" ] } } }