What is the common way to use @ViewChild in Angular strict mode?
For example, when I take the code for sorting a Material table as described in documentation
@ViewChild(MatSort) sort: MatSort;
The compiler says:
error TS2564: Property 'sort' has no initializer and is not definitely assigned in the constructor.
As a possible solution I could use
@ViewChild(MatSort, { static: false }) sort!: MatSort;
... but that seems to me more like a workaround.