is there a way to add typing information to this function? More specifically how do you add type information to `arguments`?
function gtag() {
dataLayer.push(arguments);
}
Of course the error you get is Expected 0 arguments, but got 2. when trying to call e.g. gtag(1, 2). This code snippet comes from google analytics.
Thanks
argumentsis properly typed.argumentscannot be used in typescript, this is odd since TS is supposedly a superset of JS. Also see: stackoverflow.com/questions/29918324/…