Skip to content

Commit

Permalink
Add DefinitionType to extractLiterals()
Browse files Browse the repository at this point in the history
  • Loading branch information
cengels committed Jul 4, 2023
1 parent d5ba065 commit 878fb5a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Utils/extractLiterals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { UnknownTypeError } from "../Error/UnknownTypeError";
import { AliasType } from "../Type/AliasType";
import { BaseType } from "../Type/BaseType";
import { BooleanType } from "../Type/BooleanType";
import { DefinitionType } from "../Type/DefinitionType";
import { EnumType } from "../Type/EnumType";
import { LiteralType } from "../Type/LiteralType";
import { UnionType } from "../Type/UnionType";
Expand All @@ -20,7 +21,7 @@ function* _extractLiterals(type: BaseType): Iterable<string> {
}
return;
}
if (type instanceof AliasType) {
if (type instanceof AliasType || type instanceof DefinitionType) {
yield* _extractLiterals(type.getType());
return;
}
Expand Down

0 comments on commit 878fb5a

Please sign in to comment.