mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 04:43:37 -05:00
Simplify regex a bit
This commit is contained in:
@@ -1592,7 +1592,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
/// these emit into an object literal property name, we don't need to be worried
|
||||
/// about keywords, just non-identifier characters
|
||||
function emitAttributeName(name: Identifier) {
|
||||
if (/^[A-Za-z_]+[\w]*$/.test(name.text)) {
|
||||
if (/^[A-Za-z_]\w*$/.test(name.text)) {
|
||||
emit(name);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user