Skip to content

Instantly share code, notes, and snippets.

@borlaym
Created October 3, 2019 12:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save borlaym/1c1735d12745ad5afc9c5362ad4661ec to your computer and use it in GitHub Desktop.
Save borlaym/1c1735d12745ad5afc9c5362ad4661ec to your computer and use it in GitHub Desktop.
The full issue
var obj = { prop: "test" };
function otherMethod() {
delete obj.prop;
}
function method(value: { prop?: string }) {
if (value.prop) {
otherMethod();
value.prop.charAt(0);
}
}
method(obj);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment