JsModule { bom_token: missing (optional), interpreter_token: missing (optional), directives: JsDirectiveList [], items: JsModuleItemList [ JsClassDeclaration { decorators: JsDecoratorList [], abstract_token: missing (optional), class_token: CLASS_KW@0..6 "class" [] [Whitespace(" ")], id: JsIdentifierBinding { name_token: IDENT@6..8 "A" [] [Whitespace(" ")], }, type_parameters: missing (optional), extends_clause: missing (optional), implements_clause: missing (optional), l_curly_token: L_CURLY@8..9 "{" [] [], members: JsClassMemberList [ JsBogusMember { items: [ JsPropertyModifierList [], JsLiteralMemberName { value: IDENT@9..12 "a" [Newline("\n"), Whitespace(" ")] [], }, JsBogus { items: [ COLON@12..14 ":" [] [Whitespace(" ")], TsStringType { string_token: STRING_KW@14..20 "string" [] [], }, ], }, SEMICOLON@20..21 ";" [] [], ], }, JsBogusMember { items: [ JsPropertyModifierList [], JsLiteralMemberName { value: IDENT@21..24 "b" [Newline("\n"), Whitespace(" ")] [], }, JsBogus { items: [ QUESTION@24..25 "?" [] [], TsTypeAnnotation { colon_token: COLON@25..27 ":" [] [Whitespace(" ")], ty: TsStringType { string_token: STRING_KW@27..33 "string" [] [], }, }, ], }, SEMICOLON@33..34 ";" [] [], ], }, JsBogusMember { items: [ JsPropertyModifierList [], JsLiteralMemberName { value: IDENT@34..37 "c" [Newline("\n"), Whitespace(" ")] [], }, JsBogus { items: [ BANG@37..38 "!" [] [], TsTypeAnnotation { colon_token: COLON@38..40 ":" [] [Whitespace(" ")], ty: TsStringType { string_token: STRING_KW@40..46 "string" [] [], }, }, ], }, ], }, ], r_curly_token: R_CURLY@46..48 "}" [Newline("\n")] [], }, ], eof_token: EOF@48..49 "" [Newline("\n")] [], } 0: JS_MODULE@0..49 0: (empty) 1: (empty) 2: JS_DIRECTIVE_LIST@0..0 3: JS_MODULE_ITEM_LIST@0..48 0: JS_CLASS_DECLARATION@0..48 0: JS_DECORATOR_LIST@0..0 1: (empty) 2: CLASS_KW@0..6 "class" [] [Whitespace(" ")] 3: JS_IDENTIFIER_BINDING@6..8 0: IDENT@6..8 "A" [] [Whitespace(" ")] 4: (empty) 5: (empty) 6: (empty) 7: L_CURLY@8..9 "{" [] [] 8: JS_CLASS_MEMBER_LIST@9..46 0: JS_BOGUS_MEMBER@9..21 0: JS_PROPERTY_MODIFIER_LIST@9..9 1: JS_LITERAL_MEMBER_NAME@9..12 0: IDENT@9..12 "a" [Newline("\n"), Whitespace(" ")] [] 2: JS_BOGUS@12..20 0: COLON@12..14 ":" [] [Whitespace(" ")] 1: TS_STRING_TYPE@14..20 0: STRING_KW@14..20 "string" [] [] 3: SEMICOLON@20..21 ";" [] [] 1: JS_BOGUS_MEMBER@21..34 0: JS_PROPERTY_MODIFIER_LIST@21..21 1: JS_LITERAL_MEMBER_NAME@21..24 0: IDENT@21..24 "b" [Newline("\n"), Whitespace(" ")] [] 2: JS_BOGUS@24..33 0: QUESTION@24..25 "?" [] [] 1: TS_TYPE_ANNOTATION@25..33 0: COLON@25..27 ":" [] [Whitespace(" ")] 1: TS_STRING_TYPE@27..33 0: STRING_KW@27..33 "string" [] [] 3: SEMICOLON@33..34 ";" [] [] 2: JS_BOGUS_MEMBER@34..46 0: JS_PROPERTY_MODIFIER_LIST@34..34 1: JS_LITERAL_MEMBER_NAME@34..37 0: IDENT@34..37 "c" [Newline("\n"), Whitespace(" ")] [] 2: JS_BOGUS@37..46 0: BANG@37..38 "!" [] [] 1: TS_TYPE_ANNOTATION@38..46 0: COLON@38..40 ":" [] [Whitespace(" ")] 1: TS_STRING_TYPE@40..46 0: STRING_KW@40..46 "string" [] [] 9: R_CURLY@46..48 "}" [Newline("\n")] [] 4: EOF@48..49 "" [Newline("\n")] [] -- js_class_property_with_ts_annotation.js:2:3 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × return types can only be used in TypeScript files 1 │ class A { > 2 │ a: string; │ ^^^^^^^^ 3 │ b?: string; 4 │ c!: string i remove this type annotation -- js_class_property_with_ts_annotation.js:3:3 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × `?` modifiers can only be used in TypeScript files 1 │ class A { 2 │ a: string; > 3 │ b?: string; │ ^ 4 │ c!: string 5 │ } -- js_class_property_with_ts_annotation.js:4:3 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × `!` modifiers can only be used in TypeScript files 2 │ a: string; 3 │ b?: string; > 4 │ c!: string │ ^ 5 │ } 6 │ -- class A { a: string; b?: string; c!: string }