I am trying to create a web part to deploy to SharePoint Online. Following this Connect your web part to SharePoint.
When I add the code below. I receive the errors below.
Do you have to have Office 365 Admin permissions to this to run? I am a Site Collection Administrator. Or maybe it's something else?
Error TS6133: '_getListData' is declared but its value is never read. Error @typescript-eslint/no-empty-function: Unexpected empty arrow function.
private _getListData(): Promise<ISPLists> {
return this.context.spHttpClient.get(`${this.context.pageContext.web.absoluteUrl}/_api/web/lists?$filter=Hidden eq false`, SPHttpClient.configurations.v1)
.then((response: SPHttpClientResponse) => {
return response.json();
})
.catch(() => {});
}