Within my JavaScript code, I have a class called class1
that takes in another class called class2
as a parameter in the constructor.
My goal is to be able to access all the functions of class2
directly from class1
, without having to manually declare each function in class1
and then call it on class2
.
Is there a smart and efficient way to achieve this?