Skip to content

No object member completions for nullable objects #10314

Closed
@DanielRosenwasser

Description

@DanielRosenwasser
declare function aFun(bar?: { hello: number, world: string });
declare function bFun(bar: { hello: number, world: string } | null);
declare function cFun(bar: { hello: number, world: string } | undefined);
declare function dFun(bar: { hello: number, world: string } | undefined | null);

aFun({ /*1*/ });
bFun({ /*2*/ });
cFun({ /*3*/ });
dFun({ /*4*/ });

Expected: hello and world are valid completions at each marked comment.
Actual: No completions at either location.

Metadata

Metadata

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions