Skip to content

Commit afa61e9

Browse files
committed
fix: remove unnecessary comments
1 parent 4666fec commit afa61e9

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/components/object-definition.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,8 @@ function isStringLiteralOrStringIntersection(subtype: ts.Type, checker: ts.TypeC
9191
if (subtype.isStringLiteral() || subtype.flags & ts.TypeFlags.StringLiteral) {
9292
return true;
9393
}
94-
// Check if it's an intersection type that represents "string & something"
95-
// This pattern is used to allow custom strings while providing autocomplete for known literals
9694
if (subtype.isIntersection()) {
9795
const stringified = stringifyType(subtype, checker);
98-
// Match patterns like "string & { _?: undefined; }" or similar
9996
if (stringified.startsWith('string &')) {
10097
return true;
10198
}
@@ -126,8 +123,6 @@ function getUnionTypeDefinition(
126123
if (subtype.isStringLiteral()) {
127124
return (subtype as ts.LiteralType).value.toString();
128125
}
129-
// For intersection types like "string & { _?: undefined; }", return "string"
130-
// This indicates that custom string values are allowed
131126
if (subtype.isIntersection()) {
132127
return 'string';
133128
}

0 commit comments

Comments
 (0)