En mecanografiado tengo este objeto de tipo "Eular" (de la biblioteca three.js). El objeto tiene 3 propiedades a las que puedo acceder x , y , z , así
obj.z = 1;Pero supongamos que tengo esto ahora
var key = "z"; ¿Cómo puedo acceder a la propiedad z usando la key variable?
esto no funciona
obj[key] = 1;entiendo esto
Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Euler'. No index signature with a parameter of type 'string' was found on type 'Euler'.ts(7053)Gracias