Skip to content

Commit

Permalink
fix(types): make FileHeaderArgs.commentStyle optional (#743)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeekoZhu authored Dec 7, 2021
1 parent 3570dfc commit 401d93b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/common/formatHelpers/fileHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const defaultFormatting = {
* StyleDictionary.registerFormat({
* name: 'myCustomFormat',
* formatter: function({ dictionary, file }) {
* return fileHeader({file, 'short') +
* return fileHeader({file, commentStyle: 'short'}) +
* dictionary.allTokens.map(token => `${token.name} = ${token.value}`)
* .join('\n');
* }
Expand Down
2 changes: 1 addition & 1 deletion types/FormatHelpers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export interface CommentFormatting {

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

Expand Down

0 comments on commit 401d93b

Please sign in to comment.