Skip to content

Add type definition #38

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

Merged
merged 1 commit into from
Dec 18, 2020
Merged

Add type definition #38

merged 1 commit into from
Dec 18, 2020

Conversation

38elements
Copy link
Contributor

@38elements 38elements commented Mar 28, 2020

This adds type definition.

}


class Markup extends Component<Props, {}> {
Copy link

Choose a reason for hiding this comment

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

This can be changed to export default class ... instead of adding the export at the end.

Choose a reason for hiding this comment

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

Suggested change
class Markup extends Component<Props, {}> {
export default class Markup extends Component<Props, {}> {

Copy link

@donovantc donovantc left a comment

Choose a reason for hiding this comment

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

By making these suggested changes this works, at least based on testing it locally. Additionally, it solves #43.

}


class Markup extends Component<Props, {}> {

Choose a reason for hiding this comment

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

Suggested change
class Markup extends Component<Props, {}> {
export default class Markup extends Component<Props, {}> {

}


export default Markup

Choose a reason for hiding this comment

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

Suggested change
export default Markup

@donovantc
Copy link

Any chance you could finalise this PR @38elements? Unfortunately, I'm dependent on these changes and getting this merged would save me having to use a fork of the repo. Thanks.

@38elements
Copy link
Contributor Author

It has already been completed.
It seems your action is just cosmetic change.

@donovantc
Copy link

Yeah and based on a suggestion from the reviewer @Zoramite. @developit would you be willing to merge this PR?

@developit
Copy link
Owner

Sorry for the delay.

FWIW typescript definitions really shouldn't prevent usage of a module. You can declare them in your own project using ambient module definitions:

module 'preact-markup' {
  export default Markup {
    // Etc
  }
}

@developit developit merged commit 4b76f17 into developit:master Dec 18, 2020
@38elements 38elements deleted the types branch December 20, 2020 07:48
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.

4 participants