params
property of ParamsMap is defined here
Like @jonrsharpe mentioned, it is defined on the object itself,
.subscribe((paramMap) => {
console.log(paramMap.[<yourQueryParamKey>])
});
The type of paramMap
is Params,
So actually decoupling the type is:
.subscribe((paramMap: [key: string]: any) => ...
[key: string]: any
correlates with everything (including params
property) so this is actually typed
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…