I assume that you will have to wrap it in an anonymous function so that it doesn't execute:
someFunction(() => myClass.foo);
Or you can get getter function, but it is less readable than above:
someFunction(Object.getOwnPropertyDescriptor(myClass, 'foo').get);
source share