swc/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithLiteralPropertyNameInES6.json

527 lines
12 KiB
JSON

{
"type": "Script",
"span": {
"start": 17,
"end": 287,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 23,
"end": 24,
"ctxt": 0
},
"value": "B",
"optional": false
},
"declare": false,
"span": {
"start": 17,
"end": 287,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 31,
"end": 44,
"ctxt": 0
},
"key": {
"type": "StringLiteral",
"span": {
"start": 31,
"end": 38,
"ctxt": 0
},
"value": "hello",
"raw": "\"hello\""
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 41,
"end": 43,
"ctxt": 0
},
"value": 10.0,
"raw": "10"
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 49,
"end": 65,
"ctxt": 0
},
"key": {
"type": "NumericLiteral",
"span": {
"start": 49,
"end": 54,
"ctxt": 0
},
"value": 6.0,
"raw": "0b110"
},
"value": {
"type": "StringLiteral",
"span": {
"start": 57,
"end": 64,
"ctxt": 0
},
"value": "world",
"raw": "\"world\""
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 70,
"end": 88,
"ctxt": 0
},
"key": {
"type": "NumericLiteral",
"span": {
"start": 70,
"end": 77,
"ctxt": 0
},
"value": 10076.0,
"raw": "0o23534"
},
"value": {
"type": "StringLiteral",
"span": {
"start": 80,
"end": 87,
"ctxt": 0
},
"value": "WORLD",
"raw": "\"WORLD\""
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 93,
"end": 107,
"ctxt": 0
},
"key": {
"type": "NumericLiteral",
"span": {
"start": 93,
"end": 95,
"ctxt": 0
},
"value": 20.0,
"raw": "20"
},
"value": {
"type": "StringLiteral",
"span": {
"start": 98,
"end": 106,
"ctxt": 0
},
"value": "twenty",
"raw": "\"twenty\""
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassMethod",
"span": {
"start": 112,
"end": 123,
"ctxt": 0
},
"key": {
"type": "StringLiteral",
"span": {
"start": 112,
"end": 117,
"ctxt": 0
},
"value": "foo",
"raw": "\"foo\""
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 112,
"end": 123,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 120,
"end": 123,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 128,
"end": 139,
"ctxt": 0
},
"key": {
"type": "NumericLiteral",
"span": {
"start": 128,
"end": 134,
"ctxt": 0
},
"value": 14.0,
"raw": "0b1110"
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 128,
"end": 139,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 137,
"end": 139,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 144,
"end": 152,
"ctxt": 0
},
"key": {
"type": "NumericLiteral",
"span": {
"start": 144,
"end": 146,
"ctxt": 0
},
"value": 11.0,
"raw": "11"
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 144,
"end": 152,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 149,
"end": 152,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 157,
"end": 172,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 157,
"end": 166,
"ctxt": 0
},
"value": "interface",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 157,
"end": 172,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 169,
"end": 172,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassProperty",
"span": {
"start": 177,
"end": 197,
"ctxt": 0
},
"key": {
"type": "StringLiteral",
"span": {
"start": 184,
"end": 188,
"ctxt": 0
},
"value": "hi",
"raw": "\"hi\""
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 191,
"end": 196,
"ctxt": 0
},
"value": 10000.0,
"raw": "10000"
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 202,
"end": 227,
"ctxt": 0
},
"key": {
"type": "NumericLiteral",
"span": {
"start": 209,
"end": 211,
"ctxt": 0
},
"value": 22.0,
"raw": "22"
},
"value": {
"type": "StringLiteral",
"span": {
"start": 214,
"end": 226,
"ctxt": 0
},
"value": "twenty-two",
"raw": "\"twenty-two\""
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 232,
"end": 256,
"ctxt": 0
},
"key": {
"type": "NumericLiteral",
"span": {
"start": 239,
"end": 244,
"ctxt": 0
},
"value": 5.0,
"raw": "0b101"
},
"value": {
"type": "StringLiteral",
"span": {
"start": 247,
"end": 255,
"ctxt": 0
},
"value": "binary",
"raw": "\"binary\""
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
},
{
"type": "ClassProperty",
"span": {
"start": 261,
"end": 285,
"ctxt": 0
},
"key": {
"type": "NumericLiteral",
"span": {
"start": 268,
"end": 274,
"ctxt": 0
},
"value": 1693.0,
"raw": "0o3235"
},
"value": {
"type": "StringLiteral",
"span": {
"start": 277,
"end": 284,
"ctxt": 0
},
"value": "octal",
"raw": "\"octal\""
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}