mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Avoid dependent parameters narrowings if any declared symbol of the parameter is assigned to (#56313)
This commit is contained in:
1 parent
973b0e63c1
commit
af368780cd
10 files changed
+352
-3
No files matched your search
@@ -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