Skip to content

Commit 9a7d384

Browse files
committed
Adjust comment about chars valid in jsx names but not js idents
1 parent 5edf8c0 commit 9a7d384

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/compiler/checker.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24575,10 +24575,11 @@ namespace ts {
2457524575
}
2457624576

2457724577
/**
24578-
* Returns true iff the JSX element name would be a valid JS identifier, ignoring restrictions about keywords not being identifiers
24578+
* Returns true if the hyphen character is not in the JSX element name preventing it from being a valid JS identifier,
24579+
* ignoring restrictions about keywords not being identifiers
2457924580
*/
2458024581
function isUnhyphenatedJsxName(name: string | __String) {
24581-
// - is the only character supported in JSX attribute names that isn't valid in JavaScript identifiers
24582+
// - is one of only two characters supported in JSX attribute names that isn't valid in JavaScript identifiers, : being the other
2458224583
return !stringContains(name as string, "-");
2458324584
}
2458424585

0 commit comments

Comments
 (0)