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

Incorrect type definition for FileHeaderArgs.commentStyle #742

Closed
ZeekoZhu opened this issue Dec 1, 2021 · 0 comments
Closed

Incorrect type definition for FileHeaderArgs.commentStyle #742

ZeekoZhu opened this issue Dec 1, 2021 · 0 comments

Comments

@ZeekoZhu
Copy link
Contributor

ZeekoZhu commented Dec 1, 2021

FileHeaderArgs.commentStyle should be optional

* @param {String} options.commentStyle - The only options are 'short' and 'xml', which will use the // or \<!-- --> style comments respectively. Anything else will use \/\* style comments.

However, its current type definition is:

export interface FileHeaderArgs {
  file: File;
  commentStyle: string;
  formatting?: CommentFormatting;
}

This cause an error when you want to use /* style by omiting commentStyle.

And, BTW, the example of fileHeader has syntax error:

* return fileHeader({file, 'short') +

It should be:

return fileHeader({file, commentStyle: 'short'}) +
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

No branches or pull requests

1 participant