Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
194 changes: 194 additions & 0 deletions tests/baselines/reference/completionPropertyFromConstraint.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
=== /tests/cases/fourslash/completionPropertyFromConstraint.ts ===
// interface Styles {
// alignContent: string | null;
// alignItems: string | null;
// alignmentBaseline: string | null;
// // etc..
// [key: string]: any
// }
//
// interface StyleMap {
// [name: string]: Partial<Styles>
// }
//
// declare function createStyles<T extends StyleMap>(styles: T): T
//
// createStyles({
// x: {
// '': ''
//
// | ----------------------------------------------------------------------
// | (property) alignContent?: string
// | (property) alignItems?: string
// | (property) alignmentBaseline?: string
// | ----------------------------------------------------------------------
// }
// });

[
{
"marker": {
"fileName": "/tests/cases/fourslash/completionPropertyFromConstraint.ts",
"position": 300,
"name": "1"
},
"item": {
"isGlobalCompletion": false,
"isMemberCompletion": true,
"isNewIdentifierLocation": false,
"optionalReplacementSpan": {
"start": 300,
"length": 0
},
"entries": [
{
"name": "alignContent",
"kind": "property",
"kindModifiers": "optional",
"sortText": "11",
"replacementSpan": {
"start": 300,
"length": 0
},
"displayParts": [
{
"text": "(",
"kind": "punctuation"
},
{
"text": "property",
"kind": "text"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "alignContent",
"kind": "propertyName"
},
{
"text": "?",
"kind": "punctuation"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "string",
"kind": "keyword"
}
],
"documentation": []
},
{
"name": "alignItems",
"kind": "property",
"kindModifiers": "optional",
"sortText": "11",
"replacementSpan": {
"start": 300,
"length": 0
},
"displayParts": [
{
"text": "(",
"kind": "punctuation"
},
{
"text": "property",
"kind": "text"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "alignItems",
"kind": "propertyName"
},
{
"text": "?",
"kind": "punctuation"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "string",
"kind": "keyword"
}
],
"documentation": []
},
{
"name": "alignmentBaseline",
"kind": "property",
"kindModifiers": "optional",
"sortText": "11",
"replacementSpan": {
"start": 300,
"length": 0
},
"displayParts": [
{
"text": "(",
"kind": "punctuation"
},
{
"text": "property",
"kind": "text"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "alignmentBaseline",
"kind": "propertyName"
},
{
"text": "?",
"kind": "punctuation"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "string",
"kind": "keyword"
}
],
"documentation": []
}
]
}
}
]
23 changes: 23 additions & 0 deletions tests/cases/fourslash/completionPropertyFromConstraint.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/// <reference path="fourslash.ts"/>

//// interface Styles {
//// alignContent: string | null;
//// alignItems: string | null;
//// alignmentBaseline: string | null;
//// // etc..
//// [key: string]: any
//// }
////
//// interface StyleMap {
//// [name: string]: Partial<Styles>
//// }
////
//// declare function createStyles<T extends StyleMap>(styles: T): T
////
//// createStyles({
//// x: {
//// '/*1*/': ''
//// }
//// });

verify.baselineCompletions();