Useful or not, from you.
angular Backwards compatibility with angular 7 wrt `static` view queries

So with the the latest angular 8.0.0-rc.5, a breaking change was included where @ViewChild must define a static option.

In the latest angular 7 release (7.2.15) this option does not exist, causing a typescript error during compilation.

Imho this change is unacceptable for library authors. I have a private component library where i cannot force everyone to upgrade to angular 8 all at once. My plan was to change the peerDependencies to "@angular/core": "^7.0.0 || ^8.0.0",, but with the static option breaking change i cannot do that.

I suppose one workaround is to "cast" the options type to any, but i'd rather not do that since that way the typescript compiler might miss bugs.

@ViewChild('scroller', { static: true } as any) scroller: ElementRef<HTMLElement>;

Other options may be to release a new angular 7 patch version that includes the static option, but does nothing with it (a NOOP)? But at least that way it will compile?

That's a useful answer
Without any help

Just to be clear, this is the error i'm getting:

error TS2345: Argument of type '{ static: boolean; }' is not assignable to parameter of type '{ read?: any; }'.