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
2 changes: 1 addition & 1 deletion internal/checker/flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -1427,7 +1427,7 @@ func (c *Checker) getCandidateDiscriminantPropertyAccess(f *FlowState, expr *ast
// parameter declared in the same parameter list is a candidate.
if ast.IsIdentifier(expr) {
symbol := c.getResolvedSymbol(expr)
declaration := symbol.ValueDeclaration
declaration := c.getExportSymbolOfValueSymbolIfExported(symbol).ValueDeclaration
if declaration != nil && (ast.IsBindingElement(declaration) || ast.IsParameter(declaration)) && f.reference == declaration.Parent && declaration.Initializer() == nil && !hasDotDotDotToken(declaration) {
return declaration
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ if (discriminator2) {
>discriminator2 : boolean

value2;
>value2 : string | null | undefined
>value2 : string
}

This file was deleted.