Where the Params type alias is used, it's telling you that it is (or expects) an object literal with key|value pairs, with the value being of type any
export declare type Params = {
[key: string]: any;
};
It's not a class, so you cannot instantiate it. Officially it's called a type alias, and acts more like an interface than a class, but with some differences e.g. cannot be implemented by a class
It's not terribly helpful, as every object can have key|value pairs, but aliases are used in some cases for documentation purposes
In the ActivatedRoute documentation, we can see that the params Observable returns objects of type Params - so we know there will be values we can access using property accessor bracket notation route.snapshot.params["id"];
params Observable<Params>
An observable of the matrix parameters scoped to this route
'Params' only refers to a type, but is being used as a value here.Also if you want to have apushmethod you should really define that explicitly, not as part of a general index signature. If you want tonewsomething up you need to define a class.