pogi
pogi copied to clipboard
Using pre-generated interface without typescript
Hi, i wanna use pre-generated interface without typescript in my project. It possible?
If you mean this one: http://pogi.readthedocs.io/en/latest/generatingInterfaceForTables? This is only for typescript.
But if you meant whether you can use the whole project as it is? (Like what the documentation says without ts) yes you can.
if i don't use typescript and wanna use PgTable api, what then?
This is the nice thing in typescript, you can use the PgTable api as it is compiled to js (consider it as a standard js library). You just need to use the documentation for the parameters instead to get the code completition and type-checks right at development time.
You just need to include the files from "lib" and good to go!
However I do recommend to use ts, it will definitely save you time in long term!