After updating Angular, I encountered issues with my code. Previously, the following code worked fine:
@Component({
templateUrl: './some.component.html',
styleUrls: ['./some.component.scss']
})
export class SomeComponent {
...
public someMethod(): void {
const defs = this.svg.select(function() {return this.parentNode; })
.append('defs');
...
}
...
}
However, now it is throwing two error messages:
'this' implicitly has type 'any' because it does not have a type annotation.
An outer value of 'this' is shadowed by this container.
Can anyone suggest the correct replacement for this line?