We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
TypeScript Version: 3.8.0-dev.20191112, 3.7.2
Search Terms:
Code
interface z { name?: string; } var z: z = { name: 'qwe' } delete z?.name; console.log(z);
Expected behavior: property is deleted from the object Actual behavior: property still exists in the object Playground Link: http://www.typescriptlang.org/play/?ts=3.8.0-dev.20191112#
Related Issues: I haven't found any related bugs
compiles to:
... delete ((_a = z) === null || _a === void 0 ? void 0 : _a.name);
I think it should compile to something like this:
((_a = z) === null || _a === void 0 ? void 0 : delete _a.name);
TypeScript Version: 3.8.0-dev.20191112, 3.7.2
Search Terms:
Code
Expected behavior: property is deleted from the object
Actual behavior: property still exists in the object
Playground Link: http://www.typescriptlang.org/play/?ts=3.8.0-dev.20191112#
Related Issues: I haven't found any related bugs
compiles to:
I think it should compile to something like this: