Beginner Question: Where is `publicAPI.getActiveSource` declared?

I can find declarations for most functions in the vtk.js source code. For example, publicAPI.setActiveSource is in /Proxy/Core/ProxyManager/core.js:

  publicAPI.setActiveSource = (source) => {
    if (model.activeSource !== source) {
      if (model.activeSourceSubscription) {
        model.activeSourceSubscription = null;
      model.activeSource = source;
      if (source) {
        model.activeSourceSubscription = source.onModified(publicAPI.modified);

But when I search for publicAPI.getActiveSource I find only usages. For example it is used in Proxy/Core/ProxyManager/properties.js in the publicAPI.getSections function.

Is it being created dynamically? Any help is appreciated.


Yes, it’s created dynamically here: vtk-js/index.js at master · Kitware/vtk-js · GitHub. The setGet function generates a setter and getter for a given list of properties.

1 Like