By ensuring that typescript compilation actually succeeds, this can catch
errors in the generated typescript code.
If a test fails, it also outputs errors like:
typescript generation: tests/apis/test.json: (7,8): '=' expected.
ERROR line: type x - any = any;
typescript generation: tests/apis/test.json: (7,10): Cannot find name 'any'.
ERROR line: type x - any = any;
typescript generation: tests/apis/test.json: (7,14): ';' expected.
ERROR line: type x - any = any;
typescript generation: tests/apis/test.json: (7,16): Cannot find name 'any'.
ERROR line: type x - any = any;
ERRORS seen, generated code preserved in: tmp-14119f8ix0j7tPPOJ/tmp-14119xCh86tpdRHqL.ts
or
typescript generation: tests/apis/uber.json: (160,29): Argument of type '"{id}"' is not assignable to parameter of type 'RegExp'.
ERROR line: path = path.replace('{id}', parameters['id']);
typescript generation: tests/apis/uber.json: (205,33): Argument of type '"{id}"' is not assignable to parameter of type 'RegExp'.
ERROR line: path = path.replace('{id}', parameters['id']);
generated code preserved in:tmp-13001eulrYDIm346L/tmp-13001X0iZIo8ED9z9.ts
These can be cleaned up by a call to npm run clean.
Note: the above errors were also fixed in this PR.
By ensuring that typescript compilation actually succeeds, this can catch errors in the generated typescript code.
If a test fails, it also outputs errors like:
or
These can be cleaned up by a call to
npm run clean
.Note: the above errors were also fixed in this PR.