mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Avoid dependent parameters narrowings if any declared symbol of the parameter is assigned to (#56313)
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// @strict: true
|
||||
// @noEmit: true
|
||||
|
||||
function ff({ a, b }: { a: string | undefined, b: () => void }) {
|
||||
if (a !== undefined) {
|
||||
b = () => {
|
||||
const x: string = a;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user