-
Notifications
You must be signed in to change notification settings - Fork 30
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
Conversation
} | ||
|
||
|
||
class Markup extends Component<Props, {}> { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class Markup extends Component<Props, {}> { | |
export default class Markup extends Component<Props, {}> { |
There was a problem hiding this 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, {}> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class Markup extends Component<Props, {}> { | |
export default class Markup extends Component<Props, {}> { |
} | ||
|
||
|
||
export default Markup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export default Markup |
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. |
It has already been completed. |
Yeah and based on a suggestion from the reviewer @Zoramite. @developit would you be willing to merge this PR? |
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
}
} |
This adds type definition.