JsModule { bom_token: missing (optional), interpreter_token: missing (optional), directives: JsDirectiveList [], items: JsModuleItemList [ TsDeclareStatement { declare_token: DECLARE_KW@0..8 "declare" [] [Whitespace(" ")], declaration: TsDeclareFunctionDeclaration { async_token: missing (optional), function_token: FUNCTION_KW@8..17 "function" [] [Whitespace(" ")], id: JsIdentifierBinding { name_token: IDENT@17..21 "test" [] [], }, type_parameters: TsTypeParameters { l_angle_token: L_ANGLE@21..22 "<" [] [], items: TsTypeParameterList [ TsTypeParameter { modifiers: TsTypeParameterModifierList [], name: TsTypeParameterName { ident_token: IDENT@22..23 "A" [] [], }, constraint: missing (optional), default: missing (optional), }, COMMA@23..25 "," [] [Whitespace(" ")], TsTypeParameter { modifiers: TsTypeParameterModifierList [], name: TsTypeParameterName { ident_token: IDENT@25..26 "B" [] [], }, constraint: missing (optional), default: missing (optional), }, COMMA@26..28 "," [] [Whitespace(" ")], TsTypeParameter { modifiers: TsTypeParameterModifierList [], name: TsTypeParameterName { ident_token: IDENT@28..29 "R" [] [], }, constraint: missing (optional), default: missing (optional), }, ], r_angle_token: R_ANGLE@29..30 ">" [] [], }, parameters: JsParameters { l_paren_token: L_PAREN@30..31 "(" [] [], items: JsParameterList [ JsFormalParameter { decorators: JsDecoratorList [], binding: JsIdentifierBinding { name_token: IDENT@31..32 "a" [] [], }, question_mark_token: missing (optional), type_annotation: TsTypeAnnotation { colon_token: COLON@32..34 ":" [] [Whitespace(" ")], ty: TsReferenceType { name: JsReferenceIdentifier { value_token: IDENT@34..35 "A" [] [], }, type_arguments: missing (optional), }, }, initializer: missing (optional), }, COMMA@35..37 "," [] [Whitespace(" ")], JsFormalParameter { decorators: JsDecoratorList [], binding: JsIdentifierBinding { name_token: IDENT@37..38 "b" [] [], }, question_mark_token: missing (optional), type_annotation: TsTypeAnnotation { colon_token: COLON@38..40 ":" [] [Whitespace(" ")], ty: TsReferenceType { name: JsReferenceIdentifier { value_token: IDENT@40..41 "B" [] [], }, type_arguments: missing (optional), }, }, initializer: missing (optional), }, ], r_paren_token: R_PAREN@41..42 ")" [] [], }, return_type_annotation: TsReturnTypeAnnotation { colon_token: COLON@42..44 ":" [] [Whitespace(" ")], ty: TsReferenceType { name: JsReferenceIdentifier { value_token: IDENT@44..45 "R" [] [], }, type_arguments: missing (optional), }, }, semicolon_token: SEMICOLON@45..46 ";" [] [], }, }, TsDeclareStatement { declare_token: DECLARE_KW@46..55 "declare" [Newline("\n")] [Whitespace(" ")], declaration: TsDeclareFunctionDeclaration { async_token: missing (optional), function_token: FUNCTION_KW@55..64 "function" [] [Whitespace(" ")], id: JsIdentifierBinding { name_token: IDENT@64..69 "test2" [] [], }, type_parameters: missing (optional), parameters: JsParameters { l_paren_token: L_PAREN@69..70 "(" [] [], items: JsParameterList [ JsFormalParameter { decorators: JsDecoratorList [], binding: JsObjectBindingPattern { l_curly_token: L_CURLY@70..72 "{" [] [Whitespace(" ")], properties: JsObjectBindingPatternPropertyList [ JsObjectBindingPatternShorthandProperty { identifier: JsIdentifierBinding { name_token: IDENT@72..74 "a" [] [Whitespace(" ")], }, init: missing (optional), }, ], r_curly_token: R_CURLY@74..75 "}" [] [], }, question_mark_token: QUESTION@75..76 "?" [] [], type_annotation: TsTypeAnnotation { colon_token: COLON@76..78 ":" [] [Whitespace(" ")], ty: TsObjectType { l_curly_token: L_CURLY@78..80 "{" [] [Whitespace(" ")], members: TsTypeMemberList [ TsPropertySignatureTypeMember { readonly_token: missing (optional), name: JsLiteralMemberName { value: IDENT@80..81 "a" [] [], }, optional_token: missing (optional), type_annotation: TsTypeAnnotation { colon_token: COLON@81..83 ":" [] [Whitespace(" ")], ty: TsStringLiteralType { literal_token: JS_STRING_LITERAL@83..92 "\"string\"" [] [Whitespace(" ")], }, }, separator_token: missing (optional), }, ], r_curly_token: R_CURLY@92..93 "}" [] [], }, }, initializer: missing (optional), }, ], r_paren_token: R_PAREN@93..94 ")" [] [], }, return_type_annotation: missing (optional), semicolon_token: missing (optional), }, }, JsExpressionStatement { expression: JsIdentifierExpression { name: JsReferenceIdentifier { value_token: IDENT@94..102 "declare" [Newline("\n")] [], }, }, semicolon_token: missing (optional), }, JsFunctionDeclaration { async_token: missing (optional), function_token: FUNCTION_KW@102..112 "function" [Newline("\n")] [Whitespace(" ")], star_token: missing (optional), id: JsIdentifierBinding { name_token: IDENT@112..129 "not_a_declaration" [] [], }, type_parameters: missing (optional), parameters: JsParameters { l_paren_token: L_PAREN@129..130 "(" [] [], items: JsParameterList [], r_paren_token: R_PAREN@130..132 ")" [] [Whitespace(" ")], }, return_type_annotation: missing (optional), body: JsFunctionBody { l_curly_token: L_CURLY@132..133 "{" [] [], directives: JsDirectiveList [], statements: JsStatementList [], r_curly_token: R_CURLY@133..134 "}" [] [], }, }, ], eof_token: EOF@134..135 "" [Newline("\n")] [], } 0: JS_MODULE@0..135 0: (empty) 1: (empty) 2: JS_DIRECTIVE_LIST@0..0 3: JS_MODULE_ITEM_LIST@0..134 0: TS_DECLARE_STATEMENT@0..46 0: DECLARE_KW@0..8 "declare" [] [Whitespace(" ")] 1: TS_DECLARE_FUNCTION_DECLARATION@8..46 0: (empty) 1: FUNCTION_KW@8..17 "function" [] [Whitespace(" ")] 2: JS_IDENTIFIER_BINDING@17..21 0: IDENT@17..21 "test" [] [] 3: TS_TYPE_PARAMETERS@21..30 0: L_ANGLE@21..22 "<" [] [] 1: TS_TYPE_PARAMETER_LIST@22..29 0: TS_TYPE_PARAMETER@22..23 0: TS_TYPE_PARAMETER_MODIFIER_LIST@22..22 1: TS_TYPE_PARAMETER_NAME@22..23 0: IDENT@22..23 "A" [] [] 2: (empty) 3: (empty) 1: COMMA@23..25 "," [] [Whitespace(" ")] 2: TS_TYPE_PARAMETER@25..26 0: TS_TYPE_PARAMETER_MODIFIER_LIST@25..25 1: TS_TYPE_PARAMETER_NAME@25..26 0: IDENT@25..26 "B" [] [] 2: (empty) 3: (empty) 3: COMMA@26..28 "," [] [Whitespace(" ")] 4: TS_TYPE_PARAMETER@28..29 0: TS_TYPE_PARAMETER_MODIFIER_LIST@28..28 1: TS_TYPE_PARAMETER_NAME@28..29 0: IDENT@28..29 "R" [] [] 2: (empty) 3: (empty) 2: R_ANGLE@29..30 ">" [] [] 4: JS_PARAMETERS@30..42 0: L_PAREN@30..31 "(" [] [] 1: JS_PARAMETER_LIST@31..41 0: JS_FORMAL_PARAMETER@31..35 0: JS_DECORATOR_LIST@31..31 1: JS_IDENTIFIER_BINDING@31..32 0: IDENT@31..32 "a" [] [] 2: (empty) 3: TS_TYPE_ANNOTATION@32..35 0: COLON@32..34 ":" [] [Whitespace(" ")] 1: TS_REFERENCE_TYPE@34..35 0: JS_REFERENCE_IDENTIFIER@34..35 0: IDENT@34..35 "A" [] [] 1: (empty) 4: (empty) 1: COMMA@35..37 "," [] [Whitespace(" ")] 2: JS_FORMAL_PARAMETER@37..41 0: JS_DECORATOR_LIST@37..37 1: JS_IDENTIFIER_BINDING@37..38 0: IDENT@37..38 "b" [] [] 2: (empty) 3: TS_TYPE_ANNOTATION@38..41 0: COLON@38..40 ":" [] [Whitespace(" ")] 1: TS_REFERENCE_TYPE@40..41 0: JS_REFERENCE_IDENTIFIER@40..41 0: IDENT@40..41 "B" [] [] 1: (empty) 4: (empty) 2: R_PAREN@41..42 ")" [] [] 5: TS_RETURN_TYPE_ANNOTATION@42..45 0: COLON@42..44 ":" [] [Whitespace(" ")] 1: TS_REFERENCE_TYPE@44..45 0: JS_REFERENCE_IDENTIFIER@44..45 0: IDENT@44..45 "R" [] [] 1: (empty) 6: SEMICOLON@45..46 ";" [] [] 1: TS_DECLARE_STATEMENT@46..94 0: DECLARE_KW@46..55 "declare" [Newline("\n")] [Whitespace(" ")] 1: TS_DECLARE_FUNCTION_DECLARATION@55..94 0: (empty) 1: FUNCTION_KW@55..64 "function" [] [Whitespace(" ")] 2: JS_IDENTIFIER_BINDING@64..69 0: IDENT@64..69 "test2" [] [] 3: (empty) 4: JS_PARAMETERS@69..94 0: L_PAREN@69..70 "(" [] [] 1: JS_PARAMETER_LIST@70..93 0: JS_FORMAL_PARAMETER@70..93 0: JS_DECORATOR_LIST@70..70 1: JS_OBJECT_BINDING_PATTERN@70..75 0: L_CURLY@70..72 "{" [] [Whitespace(" ")] 1: JS_OBJECT_BINDING_PATTERN_PROPERTY_LIST@72..74 0: JS_OBJECT_BINDING_PATTERN_SHORTHAND_PROPERTY@72..74 0: JS_IDENTIFIER_BINDING@72..74 0: IDENT@72..74 "a" [] [Whitespace(" ")] 1: (empty) 2: R_CURLY@74..75 "}" [] [] 2: QUESTION@75..76 "?" [] [] 3: TS_TYPE_ANNOTATION@76..93 0: COLON@76..78 ":" [] [Whitespace(" ")] 1: TS_OBJECT_TYPE@78..93 0: L_CURLY@78..80 "{" [] [Whitespace(" ")] 1: TS_TYPE_MEMBER_LIST@80..92 0: TS_PROPERTY_SIGNATURE_TYPE_MEMBER@80..92 0: (empty) 1: JS_LITERAL_MEMBER_NAME@80..81 0: IDENT@80..81 "a" [] [] 2: (empty) 3: TS_TYPE_ANNOTATION@81..92 0: COLON@81..83 ":" [] [Whitespace(" ")] 1: TS_STRING_LITERAL_TYPE@83..92 0: JS_STRING_LITERAL@83..92 "\"string\"" [] [Whitespace(" ")] 4: (empty) 2: R_CURLY@92..93 "}" [] [] 4: (empty) 2: R_PAREN@93..94 ")" [] [] 5: (empty) 6: (empty) 2: JS_EXPRESSION_STATEMENT@94..102 0: JS_IDENTIFIER_EXPRESSION@94..102 0: JS_REFERENCE_IDENTIFIER@94..102 0: IDENT@94..102 "declare" [Newline("\n")] [] 1: (empty) 3: JS_FUNCTION_DECLARATION@102..134 0: (empty) 1: FUNCTION_KW@102..112 "function" [Newline("\n")] [Whitespace(" ")] 2: (empty) 3: JS_IDENTIFIER_BINDING@112..129 0: IDENT@112..129 "not_a_declaration" [] [] 4: (empty) 5: JS_PARAMETERS@129..132 0: L_PAREN@129..130 "(" [] [] 1: JS_PARAMETER_LIST@130..130 2: R_PAREN@130..132 ")" [] [Whitespace(" ")] 6: (empty) 7: JS_FUNCTION_BODY@132..134 0: L_CURLY@132..133 "{" [] [] 1: JS_DIRECTIVE_LIST@133..133 2: JS_STATEMENT_LIST@133..133 3: R_CURLY@133..134 "}" [] [] 4: EOF@134..135 "" [Newline("\n")] []