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

generate ts types with type keyword instead of interface #83

Closed
kkharji opened this issue Nov 13, 2022 · 3 comments
Closed

generate ts types with type keyword instead of interface #83

kkharji opened this issue Nov 13, 2022 · 3 comments

Comments

@kkharji
Copy link

kkharji commented Nov 13, 2022

Hello,

It came to my attention while trying to use an awesome library for forms that interface might have some limitation for developers using typescript advance type system.

It would be awesome if there is an option to generate with type keyword instead of interface keyword.

Thanks

See: fabian-hiller/modular-forms#2

@Brendonovich
Copy link
Collaborator

We're going to go ahead with this change in Specta, since the only real advantages provided by interfaces are declaration merging and compatibility with classes, neither of which are of concern to Specta or rspc.

@kkharji
Copy link
Author

kkharji commented Dec 9, 2022

Great to hear. Thanks @Brendonovich

@oscartbeaumont
Copy link
Member

Sorry, completely forgot to reply.

It makes sense to go ahead with the change to types. I have had enough people who know way more Typescript than me, agree making this change is fine. For reference this recent video by Matt Pocock brings up what is essentially the problem we have here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants