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

Decorators to generate Fields #886

Closed
MentalGear opened this issue May 14, 2021 · 1 comment
Closed

Decorators to generate Fields #886

MentalGear opened this issue May 14, 2021 · 1 comment
Labels
Out of scope ✖️ Proposal doesn't fit in project goals

Comments

@MentalGear
Copy link

MentalGear commented May 14, 2021

First: Thank you @MichalLytek for all your work, the guide and all the examples! I guess I speak for most, that we are really appreciating your hard work.

Is your feature request related to a problem? Please describe.
I know about the limited TS reflection system, and why Properties and @decorators Fields require redundant type definition. Yet, without a SPOT, there's more room for error.

Describe the solution you'd like
I was wondering if the ts properties could be generated from the @field decorator?
Than we would need to define types only once, e.g.
Instead of:

  @Field((type) => String)
  title!: string
  @Field((type) => String, { name: title, required: true })

Describe alternatives you've considered
TS reflection

@MichalLytek
Copy link
Owner

Short answer: no 😅

Wait for #296

@MichalLytek MichalLytek added the Out of scope ✖️ Proposal doesn't fit in project goals label May 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Out of scope ✖️ Proposal doesn't fit in project goals
Projects
None yet
Development

No branches or pull requests

2 participants