Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project license / potential addition to pocketbase-typegen #85

Closed
emmyarty opened this issue Oct 28, 2023 · 2 comments
Closed

Project license / potential addition to pocketbase-typegen #85

emmyarty opened this issue Oct 28, 2023 · 2 comments

Comments

@emmyarty
Copy link

Hi, first off thanks for this lib, it's been a total boone developing for PB with it and I'm grateful it exists.

Something I kludged together for my own use initially but intend to share once a little more polished, complete, and tested is a function which uses the types to return an instance of PB where collections are accessible through dot notation and typed using your output.

I can see that since writing it something similar has been added to pb typegen, and I'm not sure the philosophy of your project would welcome something like this which technically affects runtime behaviour. If not was wondering whether you're fine with this being forked so I could release this separately instead?

It ends up working like this, invoking the pb constructor and returning a typed instance instead:
Screenshot 2023-10-29 at 00 46 40

@patmood
Copy link
Owner

patmood commented Oct 29, 2023

Yeah sure feel free to fork it. As mentioned in pocketbase/js-sdk#152 there are low priority plans to have generated types in the official SDK eventually.

@patmood
Copy link
Owner

patmood commented Oct 29, 2023

Generally I think it's better for a package do 1 thing (type generation in this case) and other packages like yours can build on top of it. Love seeing all the development around pocketbase DX!

@patmood patmood closed this as completed Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants