DefinitionTree { definitions: [ Function( FunctionDefinition { comments: CommentGroup { comments: [], }, attributes: [], function: Keyword { value: "function", position: 0, }, name: Identifier { position: 9, value: "a", }, templates: Some( TemplateGroupDefinition { comments: CommentGroup { comments: [], }, less_than: 10, members: CommaSeparated { inner: [ TemplateDefinition { variance: Invaraint, name: Identifier { position: 11, value: "T", }, constraint: SubType( Keyword { value: "as", position: 13, }, Union( [ String( Keyword { value: "string", position: 16, }, ), SignedInteger( Default( Keyword { value: "int", position: 23, }, ), ), ], ), ), }, TemplateDefinition { variance: Covariance( 28, ), name: Identifier { position: 29, value: "U", }, constraint: None, }, ], commas: [ 26, ], }, greater_than: 30, }, ), parameters: FunctionLikeParameterListDefinition { comments: CommentGroup { comments: [], }, left_parenthesis: 31, parameters: CommaSeparated { inner: [ FunctionLikeParameterDefinition { comments: CommentGroup { comments: [], }, attributes: [], type_definition: Union( [ Identifier( TemplatedIdentifier { name: Identifier { position: 38, value: "Closure", }, templates: Some( TypeTemplateGroupDefinition { comments: CommentGroup { comments: [], }, less_than: 45, members: CommaSeparated { inner: [ Tuple { left_parenthesis: 46, type_definitions: CommaSeparated { inner: [ Identifier( TemplatedIdentifier { name: Identifier { position: 47, value: "T", }, templates: None, }, ), ], commas: [], }, right_parenthesis: 48, }, Identifier( TemplatedIdentifier { name: Identifier { position: 51, value: "U", }, templates: None, }, ), ], commas: [ 49, ], }, greater_than: 52, }, ), }, ), Dict( Keyword { value: "dict", position: 54, }, TypeTemplateGroupDefinition { comments: CommentGroup { comments: [], }, less_than: 58, members: CommaSeparated { inner: [ Identifier( TemplatedIdentifier { name: Identifier { position: 59, value: "T", }, templates: None, }, ), Identifier( TemplatedIdentifier { name: Identifier { position: 62, value: "U", }, templates: None, }, ), ], commas: [ 60, ], }, greater_than: 63, }, ), Vec( Keyword { value: "vec", position: 65, }, TypeTemplateGroupDefinition { comments: CommentGroup { comments: [], }, less_than: 68, members: CommaSeparated { inner: [ Identifier( TemplatedIdentifier { name: Identifier { position: 69, value: "U", }, templates: None, }, ), ], commas: [], }, greater_than: 70, }, ), Parenthesized { left_parenthesis: 72, type_definition: Intersection( [ Identifier( TemplatedIdentifier { name: Identifier { position: 73, value: "Foo", }, templates: Some( TypeTemplateGroupDefinition { comments: CommentGroup { comments: [], }, less_than: 76, members: CommaSeparated { inner: [ Identifier( TemplatedIdentifier { name: Identifier { position: 77, value: "T", }, templates: None, }, ), Identifier( TemplatedIdentifier { name: Identifier { position: 80, value: "U", }, templates: None, }, ), ], commas: [ 78, ], }, greater_than: 81, }, ), }, ), Identifier( TemplatedIdentifier { name: Identifier { position: 83, value: "Bar", }, templates: Some( TypeTemplateGroupDefinition { comments: CommentGroup { comments: [], }, less_than: 86, members: CommaSeparated { inner: [ Vec( Keyword { value: "vec", position: 87, }, TypeTemplateGroupDefinition { comments: CommentGroup { comments: [], }, less_than: 90, members: CommaSeparated { inner: [ Identifier( TemplatedIdentifier { name: Identifier { position: 91, value: "U", }, templates: None, }, ), ], commas: [], }, greater_than: 92, }, ), ], commas: [], }, greater_than: 93, }, ), }, ), ], ), right_parenthesis: 94, }, ], ), ellipsis: None, variable: Variable { position: 96, name: "$x", }, default: None, }, ], commas: [ 98, ], }, right_parenthesis: 101, }, return_type: FunctionLikeReturnTypeDefinition { colon: 102, type_definition: Dict( Keyword { value: "dict", position: 104, }, TypeTemplateGroupDefinition { comments: CommentGroup { comments: [], }, less_than: 108, members: CommaSeparated { inner: [ Identifier( TemplatedIdentifier { name: Identifier { position: 109, value: "Tk", }, templates: None, }, ), Identifier( TemplatedIdentifier { name: Identifier { position: 113, value: "Tv", }, templates: None, }, ), ], commas: [ 111, ], }, greater_than: 115, }, ), }, body: BlockStatement { comments: CommentGroup { comments: [], }, left_brace: 117, statements: [], right_brace: 118, }, }, ), ], eof: 120, }