-
Notifications
You must be signed in to change notification settings - Fork 26.6k
Closed
Labels
area: language-serviceIssues related to Angular's VS Code language serviceIssues related to Angular's VS Code language serviceeffort1: hourstype: bug/fix
Description
I'm submitting a ... (check one with "x")
[x] bug report => search github for a similar issue or PR before submitting
Current behavior
Language service does not correctly remove null
from types when using the ?.
operator.
Minimal reproduction of the problem with instructions
-
Start with the
quickstart
example. -
Add
"strictNullChecks": true
to thetsconfig.json
file. -
To
AppComponent
inapp.component.ts
add:
test: {a: number, b: number} | null = {
a: 1,
b: 2
}
- To the template in
app.component.ts
add:
{{test?.a}}
EXPECTED: No errors and the hover over a
to show a member of the anonymous type defined in AppComponent
RECEIVED: A diagnostic Identifier 'a' is not defined.
markgoho
Metadata
Metadata
Assignees
Labels
area: language-serviceIssues related to Angular's VS Code language serviceIssues related to Angular's VS Code language serviceeffort1: hourstype: bug/fix