pogi icon indicating copy to clipboard operation
pogi copied to clipboard

Using pre-generated interface without typescript

Open men232 opened this issue 7 years ago • 3 comments

Hi, i wanna use pre-generated interface without typescript in my project. It possible?

men232 avatar Nov 19 '17 21:11 men232

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.

holdfenytolvaj avatar Nov 19 '17 23:11 holdfenytolvaj

if i don't use typescript and wanna use PgTable api, what then?

men232 avatar Nov 19 '17 23:11 men232

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!

holdfenytolvaj avatar Nov 20 '17 00:11 holdfenytolvaj