Bernhard
03/02/2025, 10:25 PMdelete obj['property']
Robert Jaros
03/03/2025, 5:05 AMexternal fun delete(p: dynamic)
Artem Kobzar
03/03/2025, 7:12 AMjs("delete obj['property']")
Could you please describe your use-case? It's possible that your use-case could be solved in a different way, or it's so essential that we should give an access to our internal function called jsDeleteProperty
Bernhard
03/03/2025, 7:30 AMBernhard
03/03/2025, 7:45 AMfun Any.deleteProperty(property: String) = js("delete this[property]")
does not work, this works:
fun deleteProperty(obj: Any, property: String) = js("delete obj[property]")
Artem Kobzar
03/03/2025, 8:27 AMthis
as the JavaScript this
. It's a problem we know aboutEdoardo Luppi
03/03/2025, 9:43 AMjs
module already provide this function if you're importing it for other needs.Bernhard
03/03/2025, 9:44 AMturansky
03/03/2025, 2:10 PMdelete
turansky
03/03/2025, 2:11 PMReflect
turansky
03/03/2025, 2:12 PMBernhard
03/03/2025, 2:12 PM