Skip to content

Convert to TypeScript#19

Draft
buschtoens wants to merge 9 commits intotracked-tools:masterfrom
buschtoens:typescript
Draft

Convert to TypeScript#19
buschtoens wants to merge 9 commits intotracked-tools:masterfrom
buschtoens:typescript

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