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..11 "Test" [] [Whitespace(" ")], }, type_parameters: missing (optional), extends_clause: missing (optional), implements_clause: missing (optional), l_curly_token: L_CURLY@11..12 "{" [] [], members: JsClassMemberList [ JsBogusMember { items: [ JsBogus { items: [ TsDeclareModifier { modifier_token: DECLARE_KW@12..25 "declare" [Newline("\n"), Whitespace(" ")] [Whitespace(" ")], }, ], }, JsLiteralMemberName { value: IDENT@25..31 "method" [] [], }, JsParameters { l_paren_token: L_PAREN@31..32 "(" [] [], items: JsParameterList [], r_paren_token: R_PAREN@32..33 ")" [] [], }, TsReturnTypeAnnotation { colon_token: COLON@33..35 ":" [] [Whitespace(" ")], ty: TsStringType { string_token: STRING_KW@35..41 "string" [] [], }, }, SEMICOLON@41..42 ";" [] [], ], }, JsBogusMember { items: [ JsBogus { items: [ TsDeclareModifier { modifier_token: DECLARE_KW@42..55 "declare" [Newline("\n"), Whitespace(" ")] [Whitespace(" ")], }, ], }, JsLiteralMemberName { value: IDENT@55..66 "constructor" [] [], }, JsConstructorParameters { l_paren_token: L_PAREN@66..67 "(" [] [], parameters: JsConstructorParameterList [ JsBogusParameter { items: [ JsDecoratorList [], JsBogus { items: [ TsDeclareModifier { modifier_token: DECLARE_KW@67..75 "declare" [] [Whitespace(" ")], }, TsReadonlyModifier { modifier_token: READONLY_KW@75..84 "readonly" [] [Whitespace(" ")], }, ], }, JsFormalParameter { decorators: JsDecoratorList [], binding: JsIdentifierBinding { name_token: IDENT@84..88 "prop" [] [], }, question_mark_token: missing (optional), type_annotation: missing (optional), initializer: missing (optional), }, ], }, ], r_paren_token: R_PAREN@88..90 ")" [] [Whitespace(" ")], }, JsFunctionBody { l_curly_token: L_CURLY@90..91 "{" [] [], directives: JsDirectiveList [], statements: JsStatementList [], r_curly_token: R_CURLY@91..92 "}" [] [], }, ], }, JsBogusMember { items: [ JsBogus { items: [ TsDeclareModifier { modifier_token: DECLARE_KW@92..105 "declare" [Newline("\n"), Whitespace(" ")] [Whitespace(" ")], }, ], }, GET_KW@105..109 "get" [] [Whitespace(" ")], JsLiteralMemberName { value: IDENT@109..113 "test" [] [], }, L_PAREN@113..114 "(" [] [], R_PAREN@114..116 ")" [] [Whitespace(" ")], JsFunctionBody { l_curly_token: L_CURLY@116..118 "{" [] [Whitespace(" ")], directives: JsDirectiveList [], statements: JsStatementList [ JsReturnStatement { return_token: RETURN_KW@118..125 "return" [] [Whitespace(" ")], argument: JsStringLiteralExpression { value_token: JS_STRING_LITERAL@125..129 "\"a\"" [] [Whitespace(" ")], }, semicolon_token: missing (optional), }, ], r_curly_token: R_CURLY@129..130 "}" [] [], }, ], }, JsBogusMember { items: [ JsBogus { items: [ TsDeclareModifier { modifier_token: DECLARE_KW@130..143 "declare" [Newline("\n"), Whitespace(" ")] [Whitespace(" ")], }, ], }, SET_KW@143..147 "set" [] [Whitespace(" ")], JsLiteralMemberName { value: IDENT@147..151 "test" [] [], }, L_PAREN@151..152 "(" [] [], JsFormalParameter { decorators: JsDecoratorList [], binding: JsIdentifierBinding { name_token: IDENT@152..157 "value" [] [], }, question_mark_token: missing (optional), type_annotation: TsTypeAnnotation { colon_token: COLON@157..159 ":" [] [Whitespace(" ")], ty: TsStringType { string_token: STRING_KW@159..165 "string" [] [], }, }, initializer: missing (optional), }, R_PAREN@165..167 ")" [] [Whitespace(" ")], JsFunctionBody { l_curly_token: L_CURLY@167..168 "{" [] [], directives: JsDirectiveList [], statements: JsStatementList [], r_curly_token: R_CURLY@168..169 "}" [] [], }, ], }, JsBogusMember { items: [ JsBogus { items: [ TsDeclareModifier { modifier_token: DECLARE_KW@169..182 "declare" [Newline("\n"), Whitespace(" ")] [Whitespace(" ")], }, ], }, L_BRACK@182..183 "[" [] [], TsIndexSignatureParameter { binding: JsIdentifierBinding { name_token: IDENT@183..187 "name" [] [], }, type_annotation: TsTypeAnnotation { colon_token: COLON@187..189 ":" [] [Whitespace(" ")], ty: TsStringType { string_token: STRING_KW@189..195 "string" [] [], }, }, }, R_BRACK@195..196 "]" [] [], TsTypeAnnotation { colon_token: COLON@196..198 ":" [] [Whitespace(" ")], ty: TsStringType { string_token: STRING_KW@198..204 "string" [] [], }, }, SEMICOLON@204..205 ";" [] [], ], }, JsBogusMember { items: [ TsPropertySignatureModifierList [ TsDeclareModifier { modifier_token: DECLARE_KW@205..218 "declare" [Newline("\n"), Whitespace(" ")] [Whitespace(" ")], }, JsAccessorModifier { modifier_token: ACCESSOR_KW@218..227 "accessor" [] [Whitespace(" ")], }, ], JsLiteralMemberName { value: IDENT@227..230 "foo" [] [], }, TsTypeAnnotation { colon_token: COLON@230..232 ":" [] [Whitespace(" ")], ty: TsStringType { string_token: STRING_KW@232..238 "string" [] [], }, }, SEMICOLON@238..239 ";" [] [], ], }, ], r_curly_token: R_CURLY@239..241 "}" [Newline("\n")] [], }, ], eof_token: EOF@241..242 "" [Newline("\n")] [], } 0: JS_MODULE@0..242 0: (empty) 1: (empty) 2: JS_DIRECTIVE_LIST@0..0 3: JS_MODULE_ITEM_LIST@0..241 0: JS_CLASS_DECLARATION@0..241 0: JS_DECORATOR_LIST@0..0 1: (empty) 2: CLASS_KW@0..6 "class" [] [Whitespace(" ")] 3: JS_IDENTIFIER_BINDING@6..11 0: IDENT@6..11 "Test" [] [Whitespace(" ")] 4: (empty) 5: (empty) 6: (empty) 7: L_CURLY@11..12 "{" [] [] 8: JS_CLASS_MEMBER_LIST@12..239 0: JS_BOGUS_MEMBER@12..42 0: JS_BOGUS@12..25 0: TS_DECLARE_MODIFIER@12..25 0: DECLARE_KW@12..25 "declare" [Newline("\n"), Whitespace(" ")] [Whitespace(" ")] 1: JS_LITERAL_MEMBER_NAME@25..31 0: IDENT@25..31 "method" [] [] 2: JS_PARAMETERS@31..33 0: L_PAREN@31..32 "(" [] [] 1: JS_PARAMETER_LIST@32..32 2: R_PAREN@32..33 ")" [] [] 3: TS_RETURN_TYPE_ANNOTATION@33..41 0: COLON@33..35 ":" [] [Whitespace(" ")] 1: TS_STRING_TYPE@35..41 0: STRING_KW@35..41 "string" [] [] 4: SEMICOLON@41..42 ";" [] [] 1: JS_BOGUS_MEMBER@42..92 0: JS_BOGUS@42..55 0: TS_DECLARE_MODIFIER@42..55 0: DECLARE_KW@42..55 "declare" [Newline("\n"), Whitespace(" ")] [Whitespace(" ")] 1: JS_LITERAL_MEMBER_NAME@55..66 0: IDENT@55..66 "constructor" [] [] 2: JS_CONSTRUCTOR_PARAMETERS@66..90 0: L_PAREN@66..67 "(" [] [] 1: JS_CONSTRUCTOR_PARAMETER_LIST@67..88 0: JS_BOGUS_PARAMETER@67..88 0: JS_DECORATOR_LIST@67..67 1: JS_BOGUS@67..84 0: TS_DECLARE_MODIFIER@67..75 0: DECLARE_KW@67..75 "declare" [] [Whitespace(" ")] 1: TS_READONLY_MODIFIER@75..84 0: READONLY_KW@75..84 "readonly" [] [Whitespace(" ")] 2: JS_FORMAL_PARAMETER@84..88 0: JS_DECORATOR_LIST@84..84 1: JS_IDENTIFIER_BINDING@84..88 0: IDENT@84..88 "prop" [] [] 2: (empty) 3: (empty) 4: (empty) 2: R_PAREN@88..90 ")" [] [Whitespace(" ")] 3: JS_FUNCTION_BODY@90..92 0: L_CURLY@90..91 "{" [] [] 1: JS_DIRECTIVE_LIST@91..91 2: JS_STATEMENT_LIST@91..91 3: R_CURLY@91..92 "}" [] [] 2: JS_BOGUS_MEMBER@92..130 0: JS_BOGUS@92..105 0: TS_DECLARE_MODIFIER@92..105 0: DECLARE_KW@92..105 "declare" [Newline("\n"), Whitespace(" ")] [Whitespace(" ")] 1: GET_KW@105..109 "get" [] [Whitespace(" ")] 2: JS_LITERAL_MEMBER_NAME@109..113 0: IDENT@109..113 "test" [] [] 3: L_PAREN@113..114 "(" [] [] 4: R_PAREN@114..116 ")" [] [Whitespace(" ")] 5: JS_FUNCTION_BODY@116..130 0: L_CURLY@116..118 "{" [] [Whitespace(" ")] 1: JS_DIRECTIVE_LIST@118..118 2: JS_STATEMENT_LIST@118..129 0: JS_RETURN_STATEMENT@118..129 0: RETURN_KW@118..125 "return" [] [Whitespace(" ")] 1: JS_STRING_LITERAL_EXPRESSION@125..129 0: JS_STRING_LITERAL@125..129 "\"a\"" [] [Whitespace(" ")] 2: (empty) 3: R_CURLY@129..130 "}" [] [] 3: JS_BOGUS_MEMBER@130..169 0: JS_BOGUS@130..143 0: TS_DECLARE_MODIFIER@130..143 0: DECLARE_KW@130..143 "declare" [Newline("\n"), Whitespace(" ")] [Whitespace(" ")] 1: SET_KW@143..147 "set" [] [Whitespace(" ")] 2: JS_LITERAL_MEMBER_NAME@147..151 0: IDENT@147..151 "test" [] [] 3: L_PAREN@151..152 "(" [] [] 4: JS_FORMAL_PARAMETER@152..165 0: JS_DECORATOR_LIST@152..152 1: JS_IDENTIFIER_BINDING@152..157 0: IDENT@152..157 "value" [] [] 2: (empty) 3: TS_TYPE_ANNOTATION@157..165 0: COLON@157..159 ":" [] [Whitespace(" ")] 1: TS_STRING_TYPE@159..165 0: STRING_KW@159..165 "string" [] [] 4: (empty) 5: R_PAREN@165..167 ")" [] [Whitespace(" ")] 6: JS_FUNCTION_BODY@167..169 0: L_CURLY@167..168 "{" [] [] 1: JS_DIRECTIVE_LIST@168..168 2: JS_STATEMENT_LIST@168..168 3: R_CURLY@168..169 "}" [] [] 4: JS_BOGUS_MEMBER@169..205 0: JS_BOGUS@169..182 0: TS_DECLARE_MODIFIER@169..182 0: DECLARE_KW@169..182 "declare" [Newline("\n"), Whitespace(" ")] [Whitespace(" ")] 1: L_BRACK@182..183 "[" [] [] 2: TS_INDEX_SIGNATURE_PARAMETER@183..195 0: JS_IDENTIFIER_BINDING@183..187 0: IDENT@183..187 "name" [] [] 1: TS_TYPE_ANNOTATION@187..195 0: COLON@187..189 ":" [] [Whitespace(" ")] 1: TS_STRING_TYPE@189..195 0: STRING_KW@189..195 "string" [] [] 3: R_BRACK@195..196 "]" [] [] 4: TS_TYPE_ANNOTATION@196..204 0: COLON@196..198 ":" [] [Whitespace(" ")] 1: TS_STRING_TYPE@198..204 0: STRING_KW@198..204 "string" [] [] 5: SEMICOLON@204..205 ";" [] [] 5: JS_BOGUS_MEMBER@205..239 0: TS_PROPERTY_SIGNATURE_MODIFIER_LIST@205..227 0: TS_DECLARE_MODIFIER@205..218 0: DECLARE_KW@205..218 "declare" [Newline("\n"), Whitespace(" ")] [Whitespace(" ")] 1: JS_ACCESSOR_MODIFIER@218..227 0: ACCESSOR_KW@218..227 "accessor" [] [Whitespace(" ")] 1: JS_LITERAL_MEMBER_NAME@227..230 0: IDENT@227..230 "foo" [] [] 2: TS_TYPE_ANNOTATION@230..238 0: COLON@230..232 ":" [] [Whitespace(" ")] 1: TS_STRING_TYPE@232..238 0: STRING_KW@232..238 "string" [] [] 3: SEMICOLON@238..239 ";" [] [] 9: R_CURLY@239..241 "}" [Newline("\n")] [] 4: EOF@241..242 "" [Newline("\n")] [] -- ts_class_declare_modifier_error.ts:2:5 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × 'declare' modifier is only allowed on properties. 1 │ class Test { > 2 │ declare method(): string; │ ^^^^^^^ 3 │ declare constructor(declare readonly prop) {} 4 │ declare get test() { return "a" } -- ts_class_declare_modifier_error.ts:3:25 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × 'declare' cannot appear on a parameter. 1 │ class Test { 2 │ declare method(): string; > 3 │ declare constructor(declare readonly prop) {} │ ^^^^^^^ 4 │ declare get test() { return "a" } 5 │ declare set test(value: string) {} -- ts_class_declare_modifier_error.ts:3:5 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × 'declare' cannot appear on a constructor declaration. 1 │ class Test { 2 │ declare method(): string; > 3 │ declare constructor(declare readonly prop) {} │ ^^^^^^^ 4 │ declare get test() { return "a" } 5 │ declare set test(value: string) {} -- ts_class_declare_modifier_error.ts:4:5 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × 'declare' modifier is only allowed on properties. 2 │ declare method(): string; 3 │ declare constructor(declare readonly prop) {} > 4 │ declare get test() { return "a" } │ ^^^^^^^ 5 │ declare set test(value: string) {} 6 │ declare [name: string]: string; -- ts_class_declare_modifier_error.ts:5:5 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × 'declare' modifier is only allowed on properties. 3 │ declare constructor(declare readonly prop) {} 4 │ declare get test() { return "a" } > 5 │ declare set test(value: string) {} │ ^^^^^^^ 6 │ declare [name: string]: string; 7 │ declare accessor foo: string; -- ts_class_declare_modifier_error.ts:6:5 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × 'declare' modifier cannot appear on an index signature. 4 │ declare get test() { return "a" } 5 │ declare set test(value: string) {} > 6 │ declare [name: string]: string; │ ^^^^^^^ 7 │ declare accessor foo: string; 8 │ } -- ts_class_declare_modifier_error.ts:7:5 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × 'declare' cannot be used with 'accessor' modifier. 5 │ declare set test(value: string) {} 6 │ declare [name: string]: string; > 7 │ declare accessor foo: string; │ ^^^^^^^ 8 │ } 9 │ i 'declare' modifier 5 │ declare set test(value: string) {} 6 │ declare [name: string]: string; > 7 │ declare accessor foo: string; │ ^^^^^^^ 8 │ } 9 │ i 'accessor' modifier 5 │ declare set test(value: string) {} 6 │ declare [name: string]: string; > 7 │ declare accessor foo: string; │ ^^^^^^^^ 8 │ } 9 │ -- class Test { declare method(): string; declare constructor(declare readonly prop) {} declare get test() { return "a" } declare set test(value: string) {} declare [name: string]: string; declare accessor foo: string; }