node-re2 icon indicating copy to clipboard operation
node-re2 copied to clipboard

Add typecheck as tests.

Open kachick opened this issue 3 years ago • 2 comments

This PR based on #133

When I digging above issue, I found https://github.com/uhop/node-re2/pull/101#issuecomment-829322113 So tried to add typecheckers. Similar ways are used in https://github.com/octokit/types.ts/blob/725c32e3a3827d8e89a232fc09c7225fdaea84e0/test.ts.

kachick avatar Sep 16 '22 08:09 kachick

Thanks for your review!

moving it to a separate directory, e.g., ts-tests, and adding a different command to run it, e.g., npm run ts-test

How about this change? https://github.com/uhop/node-re2/pull/134/commits/e380c1879074f75604bbb26639248abc3574dacb

kachick avatar Sep 22 '22 18:09 kachick

Thank you, I plan to review it in the coming days.

uhop avatar Sep 22 '22 19:09 uhop

The code is in https://github.com/uhop/node-re2/tree/kachick-add-ts-tests branch. It includes the minimal fix from #141. It fails to compile with the latest Typescript.

I am not sure how to handle a type expansion in TS correctly. I am proposing a way in my next commit to this branch. Please review because I am not a TS programmer and can make stupid mistakes. ;-)

uhop avatar Nov 23 '22 20:11 uhop

Moving the development to #142.

uhop avatar Nov 23 '22 20:11 uhop