From 401d93b72caf02cec34fba3c214edfdd5d52b362 Mon Sep 17 00:00:00 2001 From: Zeeko Date: Wed, 8 Dec 2021 06:22:11 +0800 Subject: [PATCH] fix(types): make FileHeaderArgs.commentStyle optional (#743) --- lib/common/formatHelpers/fileHeader.js | 2 +- types/FormatHelpers.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/common/formatHelpers/fileHeader.js b/lib/common/formatHelpers/fileHeader.js index 9b33f5912..8da30d05e 100644 --- a/lib/common/formatHelpers/fileHeader.js +++ b/lib/common/formatHelpers/fileHeader.js @@ -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'); * } diff --git a/types/FormatHelpers.d.ts b/types/FormatHelpers.d.ts index 0e08e14be..f8ab8774f 100644 --- a/types/FormatHelpers.d.ts +++ b/types/FormatHelpers.d.ts @@ -39,7 +39,7 @@ export interface CommentFormatting { export interface FileHeaderArgs { file: File; - commentStyle: string; + commentStyle?: string; formatting?: CommentFormatting; }