Skip to content

Commit 5afd164

Browse files
committed
Fix bug in getDeclarationName
1 parent 07bc492 commit 5afd164

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Data/Aeson/TypeScript/Formatting.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ formatTSDeclarations' options allDeclarations =
6666
getDeclarationName :: TSDeclaration -> Maybe String
6767
getDeclarationName (TSInterfaceDeclaration {..}) = Just interfaceName
6868
getDeclarationName (TSTypeAlternatives {..}) = Just typeName
69-
_ = Nothing
69+
getDeclarationName _ = Nothing
7070

7171
removeReferencesToRemovedNames :: [String] -> TSDeclaration -> TSDeclaration
7272
removeReferencesToRemovedNames removedNames decl@(TSTypeAlternatives {..}) = decl { alternativeTypes = [x | x <- alternativeTypes, not (x `L.elem` removedNames)] }

0 commit comments

Comments
 (0)