Access plugin options in testDatasource

I’m trying to create a Datasource plugin but I’m stuck. I know Vue.js and vanilla JS but React is pretty new to me.

I have no idea how I can access my plugin’s options in testDatasource and I couldn’t find any plugin that showcases how to do so.

types.ts

/**
 * These are options configured for each DataSource instance
 */
export interface MyDataSourceOptions extends DataSourceJsonData {
  endpoint?: string;
}

DataSource.ts

  async testDatasource() {
    // Implement a health check for your data source.
    console.log('TEST..');
    console.log(this);
    console.log(this.endpoint);
    console.log(this.jsonData);
    console.log(this.options);
    console.log(this.instanceSettings);
    ..

None of these bruteforce tries work. Any help?