Added tests for union types with identical doc comments.

This commit is contained in:
Daniel
2020-05-11 21:36:43 +00:00
parent 1a88430a7e
commit 1450908e5c
2 changed files with 105 additions and 0 deletions

View File

@@ -0,0 +1,76 @@
[
{
"marker": {
"fileName": "/tests/cases/fourslash/quickInfoOnUnionPropertiesWithIdenticalJSDocComments01.ts",
"position": 746
},
"quickInfo": {
"kind": "property",
"kindModifiers": "optional",
"textSpan": {
"start": 746,
"length": 8
},
"displayParts": [
{
"text": "(",
"kind": "punctuation"
},
{
"text": "property",
"kind": "text"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "language",
"kind": "propertyName"
},
{
"text": "?",
"kind": "punctuation"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "string",
"kind": "keyword"
}
],
"documentation": [
{
"text": "A language id, like `typescript`.",
"kind": "text"
},
{
"text": "\n",
"kind": "lineBreak"
},
{
"text": "A language id, like `typescript`.",
"kind": "text"
},
{
"text": "\n",
"kind": "lineBreak"
},
{
"text": "A language id, like `typescript`.",
"kind": "text"
}
]
}
}
]

View File

@@ -0,0 +1,29 @@
/// <reference path="fourslash.ts" />
////export type DocumentFilter = {
//// /** A language id, like `typescript`. */
//// language: string;
//// /** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */
//// scheme?: string;
//// /** A glob pattern, like `*.{ts,js}`. */
//// pattern?: string;
////} | {
//// /** A language id, like `typescript`. */
//// language?: string;
//// /** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */
//// scheme: string;
//// /** A glob pattern, like `*.{ts,js}`. */
//// pattern?: string;
////} | {
//// /** A language id, like `typescript`. */
//// language?: string;
//// /** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */
//// scheme?: string;
//// /** A glob pattern, like `*.{ts,js}`. */
//// pattern: string;
////};
////
////declare let x: DocumentFilter;
////x./**/language
verify.baselineQuickInfo();