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

Make types more consistent #1157

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Make types more consistent #1157

wants to merge 4 commits into from

Conversation

NullVoxPopuli
Copy link
Owner

@NullVoxPopuli NullVoxPopuli commented Oct 11, 2024

Goal: tighten up the typed-usage story.

Might be blocked on finding a way to make decorators change the type of a property see repro in tsplayground here

Issue for TS:

TODO:
Where const Resource = resource(...)

  • make Resource in plain JS work
  • Resource is actually a function, so it should look like it
    • Resource.create().current
    • maybe: resource(({ use }, ...userStuff) => { ... })
    • goal: be able to manually do what the helper manager stuff is doing
  • Resource.property in the template should error if invocation is needed
    • e.g.: {{Resource.property}}
  • (Resource) should work in gts
  • test out removing the use types to make the above work

Copy link

stackblitz bot commented Oct 11, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

vercel bot commented Oct 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ember-resources-0a9q ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 11, 2024 5:44pm

Copy link
Contributor

github-actions bot commented Oct 11, 2024

Estimated impact to a consuming app, depending on which bundle is imported

js min min + gzip min + brotli
/index.js 14.41 kB 2.13 kB 927 B 775 B

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

Successfully merging this pull request may close these issues.

1 participant