ts-auto-guard icon indicating copy to clipboard operation
ts-auto-guard copied to clipboard

Should warn when there are no output guard files

Open kongweiying2 opened this issue 3 years ago • 3 comments

When I run yarn ts-auto-guard it just outputs this

yarn run v1.22.10
$ /Users/conwayying/programming/projects/lifemap/node_modules/.bin/ts-auto-guard
Done!
✨  Done in 14.77s.

And there doesn't appear to be a .guard.ts file generated anywhere. Am I missing something here?

kongweiying2 avatar Oct 14 '21 09:10 kongweiying2

Did you add the jsdoc comments as per the readme? https://github.com/rhys-vdw/ts-auto-guard#specify-with-annotation

rhys-vdw avatar Oct 17 '21 03:10 rhys-vdw

Silly me, I assumed it would export all types if there were no annotations. Works great now, appreciate your library - super useful! The amount of pattern matching/schema validation/run time type checking libraries for TypeScript I've looked at has been ridiculous, glad to be settling on this one.

kongweiying2 avatar Oct 24 '21 08:10 kongweiying2

@TheAussieStew thanks! Glad it's useful. It's a very simple solution. There are some other libraries that look quite nice.

I'm going to reopen this issue because ideally we'd log a warning or error if no exports are made.

rhys-vdw avatar Oct 24 '21 12:10 rhys-vdw