I was studying the the latest angular code which is in typescript and came to the following line:
const scope = self as any as ServiceWorkerGlobalScope;
What I don't understand about above is: if the type self is any why would you cast it as ServiceWorkerGlobalScope? Why wouldn't you just declare it as ServiceWorkerGlobalScope like the following:
const scope = self as ServiceWorkerGlobalScope;
or
const scope : ServiceWorkerGlobalScope = self;
What does that line mean? Does it mean scope is of type any which most like to be of type ServiceWorkerGlobalScope?