import type { DB } from "https://yourusername-kyselyVtTypes.web.val.run/?tables=tables,you,need" to your program. See that
See @easrng/kyselyVtDemo.
Quick thought, you could protect your types behind a password.
You just need to implement bearer token authentication in the vals, and use the private module mechanism: https://www.val.town/settings/private-modules
That was what I did initially but the editor doesn't respect the private module settings.
https://easrng-kyselyvttypes.web.val.run
https://esm.town/v/easrng/kyselyVtTypes
<script type="module" src="https://esm.town/v/easrng/kyselyVtTypes" />
Quick thought, you could protect your types behind a password.
You just need to implement bearer token authentication in the vals, and use the private module mechanism: https://www.val.town/settings/private-modules
That was what I did initially but the editor doesn't respect the private module settings.