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

Convert to TypeScript #19

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

buschtoens
Copy link

Closes #14.

> {
protected readonly args!: Args;

constructor(ownerOrThunk: Owner | Thunk, args: Args) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to allow the following call without type errors, the args needs to be optional:

  @use user = new FetchData(() => [
    `www.example.com/users/${this.args.userId}`
  ]);
Suggested change
constructor(ownerOrThunk: Owner | Thunk, args: Args) {
constructor(ownerOrThunk: Owner | Thunk, arg?s: Args) {

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.

TypeScript
2 participants