mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 01:49:57 -05:00
Merge branch 'rwyborn-react-factory-option'
This commit is contained in:
@@ -2979,15 +2979,9 @@ namespace ts {
|
||||
// e.g "b a" is valid quoted name but when we strip off the quotes, it is invalid.
|
||||
// We, thus, need to check if whatever was inside the quotes is actually a valid identifier name.
|
||||
if (performCharacterChecks) {
|
||||
if (!isIdentifierStart(name.charCodeAt(0), target)) {
|
||||
if (!isIdentifier(name, target)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
for (let i = 1, n = name.length; i < n; i++) {
|
||||
if (!isIdentifierPart(name.charCodeAt(i), target)) {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return name;
|
||||
|
||||
Reference in New Issue
Block a user