Created
August 27, 2021 10:18
-
-
Save eamonnboyle/6000d0398e6a9561312149353e6e7e8f to your computer and use it in GitHub Desktop.
Nested Property Aliased Condition Fail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setupComponent(component: Component) { | |
let isUsingTextArea = 'rows' in component.inputArea.control; | |
if (isUsingTextArea) { // Narrowing does not occur | |
component.inputArea.control.rows = 25; // Compiler error | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment