Files
tsgo/testdata/baselines/reference/fourslash/quickInfo/quickInfoCommentsFunctionDeclaration.baseline
e0069505b9 Use typescript instead of tsx for hover code block language (#3458)
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: jakebailey <[email protected]>
2026-04-22 17:14:11 +00:00

191 lines
4.3 KiB
Plaintext

// === QuickInfo ===
=== /quickInfoCommentsFunctionDeclaration.ts ===
// /** This comment should appear for foo*/
// function foo() {
// ^^^
// | ----------------------------------------------------------------------
// | ```typescript
// | function foo(): void
// | ```
// | This comment should appear for foo
// | ----------------------------------------------------------------------
// }
// foo();
// ^^^
// | ----------------------------------------------------------------------
// | ```typescript
// | function foo(): void
// | ```
// | This comment should appear for foo
// | ----------------------------------------------------------------------
// /** This is comment for function signature*/
// function fooWithParameters(/** this is comment about a*/a: string,
// ^^^^^^^^^^^^^^^^^
// | ----------------------------------------------------------------------
// | ```typescript
// | function fooWithParameters(a: string, b: number): void
// | ```
// | This is comment for function signature
// | ----------------------------------------------------------------------
// /** this is comment for b*/
// b: number) {
// var d = a;
// ^
// | ----------------------------------------------------------------------
// | ```typescript
// | var d: string
// | ```
// |
// | ----------------------------------------------------------------------
// }
// fooWithParameters("a",10);
// ^^^^^^^^^^^^^^^^^
// | ----------------------------------------------------------------------
// | ```typescript
// | function fooWithParameters(a: string, b: number): void
// | ```
// | This is comment for function signature
// | ----------------------------------------------------------------------
// /**
// * Does something
// * @param a a string
// */
// declare function fn(a: string);
// fn("hello");
[
{
"marker": {
"Position": 51,
"LSPosition": {
"line": 1,
"character": 10
},
"Name": "1",
"Data": {}
},
"item": {
"contents": {
"kind": "markdown",
"value": "```typescript\nfunction foo(): void\n```\nThis comment should appear for foo"
},
"range": {
"start": {
"line": 1,
"character": 9
},
"end": {
"line": 1,
"character": 12
}
}
}
},
{
"marker": {
"Position": 61,
"LSPosition": {
"line": 3,
"character": 1
},
"Name": "2",
"Data": {}
},
"item": {
"contents": {
"kind": "markdown",
"value": "```typescript\nfunction foo(): void\n```\nThis comment should appear for foo"
},
"range": {
"start": {
"line": 3,
"character": 0
},
"end": {
"line": 3,
"character": 3
}
}
}
},
{
"marker": {
"Position": 123,
"LSPosition": {
"line": 5,
"character": 11
},
"Name": "5",
"Data": {}
},
"item": {
"contents": {
"kind": "markdown",
"value": "```typescript\nfunction fooWithParameters(a: string, b: number): void\n```\nThis is comment for function signature"
},
"range": {
"start": {
"line": 5,
"character": 9
},
"end": {
"line": 5,
"character": 26
}
}
}
},
{
"marker": {
"Position": 236,
"LSPosition": {
"line": 8,
"character": 8
},
"Name": "6",
"Data": {}
},
"item": {
"contents": {
"kind": "markdown",
"value": "```typescript\nvar d: string\n```\n"
},
"range": {
"start": {
"line": 8,
"character": 8
},
"end": {
"line": 8,
"character": 9
}
}
}
},
{
"marker": {
"Position": 257,
"LSPosition": {
"line": 10,
"character": 12
},
"Name": "8",
"Data": {}
},
"item": {
"contents": {
"kind": "markdown",
"value": "```typescript\nfunction fooWithParameters(a: string, b: number): void\n```\nThis is comment for function signature"
},
"range": {
"start": {
"line": 10,
"character": 0
},
"end": {
"line": 10,
"character": 17
}
}
}
}
]