I recently came across a Typescript use case (admittedly seldom happens) for reference to the reference in which I wanted to have a function that disposes of passed in class members and set them to undefined. This is not possible in JS or Typescript as far as I can see.
privateDisposeOrbitalControls(orbitControls:OrbitControls|undefined):void{if(orbitControls!==undefined){orbitControls.dispose();orbitControls=undefined}}this.DisposeOrbitalControls(this.orbitControlsOrtho)this.DisposeOrbitalControls(this.orbitControlsPerspective)//this.orbitControlsOrtho and this.orbitControlsPerspective are not set to undefined
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I recently came across a Typescript use case (admittedly seldom happens) for reference to the reference in which I wanted to have a function that disposes of passed in class members and set them to undefined. This is not possible in JS or Typescript as far as I can see.