@@ -1140,80 +1140,80 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
1140
1140
/// Emit an name/value pair for an attribute (e.g. "x: 3")
1141
1141
function emitJsxAttribute ( node : JsxAttribute ) {
1142
1142
emitAttributeName ( node . name ) ;
1143
- write ( ': ' ) ;
1143
+ write ( ": " ) ;
1144
1144
if ( node . initializer ) {
1145
1145
emit ( node . initializer ) ;
1146
1146
}
1147
1147
else {
1148
- write ( ' true' ) ;
1148
+ write ( " true" ) ;
1149
1149
}
1150
1150
}
1151
1151
1152
1152
function emitJsxElement ( openingNode : JsxOpeningLikeElement , children ?: JsxChild [ ] ) {
1153
1153
// Call React.createElement(tag, ...
1154
1154
emitLeadingComments ( openingNode ) ;
1155
- write ( ' React.createElement(' ) ;
1155
+ write ( " React.createElement(" ) ;
1156
1156
emitTagName ( openingNode . tagName ) ;
1157
- write ( ', ' ) ;
1157
+ write ( ", " ) ;
1158
1158
1159
1159
// Attribute list
1160
1160
if ( openingNode . attributes . length === 0 ) {
1161
- // When there are no attributes, React wants ' null'
1162
- write ( ' null' ) ;
1161
+ // When there are no attributes, React wants " null"
1162
+ write ( " null" ) ;
1163
1163
}
1164
1164
else {
1165
1165
// Either emit one big object literal (no spread attribs), or
1166
1166
// a call to React.__spread
1167
1167
let attrs = openingNode . attributes ;
1168
1168
if ( attrs . some ( attr => attr . kind === SyntaxKind . JsxSpreadAttribute ) ) {
1169
- write ( ' React.__spread(' ) ;
1169
+ write ( " React.__spread(" ) ;
1170
1170
1171
1171
let haveOpenedObjectLiteral = false ;
1172
1172
for ( let i = 0 ; i < attrs . length ; i ++ ) {
1173
1173
if ( attrs [ i ] . kind === SyntaxKind . JsxSpreadAttribute ) {
1174
1174
// If this is the first argument, we need to emit a {} as the first argument
1175
1175
if ( i === 0 ) {
1176
- write ( ' {}, ' ) ;
1176
+ write ( " {}, " ) ;
1177
1177
}
1178
1178
1179
1179
if ( haveOpenedObjectLiteral ) {
1180
- write ( '}' ) ;
1180
+ write ( "}" ) ;
1181
1181
haveOpenedObjectLiteral = false ;
1182
1182
}
1183
1183
if ( i > 0 ) {
1184
- write ( ', ' ) ;
1184
+ write ( ", " ) ;
1185
1185
}
1186
1186
emit ( ( < JsxSpreadAttribute > attrs [ i ] ) . expression ) ;
1187
1187
}
1188
1188
else {
1189
1189
Debug . assert ( attrs [ i ] . kind === SyntaxKind . JsxAttribute ) ;
1190
1190
if ( haveOpenedObjectLiteral ) {
1191
- write ( ', ' ) ;
1191
+ write ( ", " ) ;
1192
1192
}
1193
1193
else {
1194
1194
haveOpenedObjectLiteral = true ;
1195
1195
if ( i > 0 ) {
1196
- write ( ', ' ) ;
1196
+ write ( ", " ) ;
1197
1197
}
1198
- write ( '{' ) ;
1198
+ write ( "{" ) ;
1199
1199
}
1200
1200
emitJsxAttribute ( < JsxAttribute > attrs [ i ] ) ;
1201
1201
}
1202
1202
}
1203
- if ( haveOpenedObjectLiteral ) write ( '}' ) ;
1203
+ if ( haveOpenedObjectLiteral ) write ( "}" ) ;
1204
1204
1205
- write ( ')' ) ; // closing paren to React.__spread(
1205
+ write ( ")" ) ; // closing paren to React.__spread(
1206
1206
}
1207
1207
else {
1208
1208
// One object literal with all the attributes in them
1209
- write ( '{' ) ;
1209
+ write ( "{" ) ;
1210
1210
for ( var i = 0 ; i < attrs . length ; i ++ ) {
1211
1211
if ( i > 0 ) {
1212
- write ( ', ' ) ;
1212
+ write ( ", " ) ;
1213
1213
}
1214
1214
emitJsxAttribute ( < JsxAttribute > attrs [ i ] ) ;
1215
1215
}
1216
- write ( '}' ) ;
1216
+ write ( "}" ) ;
1217
1217
}
1218
1218
}
1219
1219
@@ -1235,15 +1235,15 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
1235
1235
}
1236
1236
}
1237
1237
else {
1238
- write ( ', ' ) ;
1238
+ write ( ", " ) ;
1239
1239
emit ( children [ i ] ) ;
1240
1240
}
1241
1241
1242
1242
}
1243
1243
}
1244
1244
1245
1245
// Closing paren
1246
- write ( ')' ) ; // closes ' React.createElement('
1246
+ write ( ")" ) ; // closes " React.createElement("
1247
1247
emitTrailingComments ( openingNode ) ;
1248
1248
}
1249
1249
@@ -1259,20 +1259,20 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
1259
1259
function jsxEmitPreserve ( node : JsxElement | JsxSelfClosingElement ) {
1260
1260
function emitJsxAttribute ( node : JsxAttribute ) {
1261
1261
emit ( node . name ) ;
1262
- write ( '=' ) ;
1262
+ write ( "=" ) ;
1263
1263
emit ( node . initializer ) ;
1264
1264
}
1265
1265
1266
1266
function emitJsxSpreadAttribute ( node : JsxSpreadAttribute ) {
1267
- write ( ' {...' ) ;
1267
+ write ( " {..." ) ;
1268
1268
emit ( node . expression ) ;
1269
- write ( '}' ) ;
1269
+ write ( "}" ) ;
1270
1270
}
1271
1271
1272
1272
function emitAttributes ( attribs : NodeArray < JsxAttribute | JsxSpreadAttribute > ) {
1273
1273
for ( let i = 0 , n = attribs . length ; i < n ; i ++ ) {
1274
1274
if ( i > 0 ) {
1275
- write ( ' ' ) ;
1275
+ write ( " " ) ;
1276
1276
}
1277
1277
1278
1278
if ( attribs [ i ] . kind === SyntaxKind . JsxSpreadAttribute ) {
@@ -1286,26 +1286,26 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
1286
1286
}
1287
1287
1288
1288
function emitJsxOpeningOrSelfClosingElement ( node : JsxOpeningElement | JsxSelfClosingElement ) {
1289
- write ( '<' ) ;
1289
+ write ( "<" ) ;
1290
1290
emit ( node . tagName ) ;
1291
1291
if ( node . attributes . length > 0 || ( node . kind === SyntaxKind . JsxSelfClosingElement ) ) {
1292
- write ( ' ' ) ;
1292
+ write ( " " ) ;
1293
1293
}
1294
1294
1295
1295
emitAttributes ( node . attributes ) ;
1296
1296
1297
1297
if ( node . kind === SyntaxKind . JsxSelfClosingElement ) {
1298
- write ( '/>' ) ;
1298
+ write ( "/>" ) ;
1299
1299
}
1300
1300
else {
1301
- write ( '>' ) ;
1301
+ write ( ">" ) ;
1302
1302
}
1303
1303
}
1304
1304
1305
1305
function emitJsxClosingElement ( node : JsxClosingElement ) {
1306
- write ( '</' ) ;
1306
+ write ( "</" ) ;
1307
1307
emit ( node . tagName ) ;
1308
- write ( '>' ) ;
1308
+ write ( ">" ) ;
1309
1309
}
1310
1310
1311
1311
function emitJsxElement ( node : JsxElement ) {
0 commit comments