Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit 46edf00

Browse files
dozortsevKnisterPeter
authored andcommitted
fix: handle nested string literal props
closes #1131
1 parent 014f2b8 commit 46edf00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ function getComplexType(
160160
(entry: any) => {
161161
const typeDecl = get(ast, entry.value, importedPropTypes, options);
162162
return dom.create.property(
163-
entry.key.name,
163+
entry.key.type === 'StringLiteral' ? `${entry.key.value}` : entry.key.name,
164164
typeDecl.type,
165165
typeDecl.optional
166166
? dom.DeclarationFlags.Optional

0 commit comments

Comments
 (0)