Skip to content

Commit 544216d

Browse files
committed
Small refactor
Signed-off-by: Sora Morimoto <[email protected]>
1 parent 6a6351c commit 544216d

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/type-name-formatter.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,8 @@ class TypeNameFormatter {
2424
* @param options {{ type?: FormattingSchemaType }}
2525
* @return {string}
2626
*/
27-
format = (name, options) => {
28-
options = options || {};
29-
30-
/**
31-
* @type {FormattingSchemaType}
32-
*/
33-
const schemaType = options.type || "type-name";
27+
format = (name, options = {}) => {
28+
const schemaType = options.type ?? "type-name";
3429

3530
const typePrefix =
3631
schemaType === "enum-key"

0 commit comments

Comments
 (0)