File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -7406,7 +7406,7 @@ namespace ts {
7406
7406
const nameType = property.name && getLiteralTypeFromPropertyName(property.name);
7407
7407
const name = nameType && isTypeUsableAsPropertyName(nameType) ? getPropertyNameFromType(nameType) : undefined;
7408
7408
const expected = name === undefined ? undefined : getTypeOfPropertyOfType(contextualType, name);
7409
- return !!expected && isLiteralType(expected) && !isTypeIdenticalTo (getTypeOfNode(property), expected);
7409
+ return !!expected && isLiteralType(expected) && !isTypeAssignableTo (getTypeOfNode(property), expected);
7410
7410
});
7411
7411
}
7412
7412
Original file line number Diff line number Diff line change
1
+ /// <reference path="fourslash.ts" />
2
+ // @strict : true
3
+
4
+ //// interface Options {
5
+ //// hello?: boolean;
6
+ //// world?: boolean;
7
+ //// }
8
+ //// declare function foo(options?: Options): void;
9
+ //// foo({
10
+ //// hello: true,
11
+ //// /**/
12
+ //// });
13
+
14
+ verify . completions ( {
15
+ marker : "" ,
16
+ includes : [ 'world' ]
17
+ } ) ;
18
+
You can’t perform that action at this time.
0 commit comments