I have the following code inside my .ts file in SPFx web part:-
export default class DocumentsViewerWebPart extends BaseClientSideWebPart<IDocumentsViewerWebPartProps> {
private _themeProvider: ThemeProvider;
private _themeVariant: IReadonlyTheme | undefined;
protected async onInit(): Promise<void> {
this.setTheme();
await super.onInit();
}
/**
* Update the current theme variant reference and re-render.
*
* @param args The new theme
*/
private _handleThemeChangedEvent(args: ThemeChangedEventArgs): void {
this._themeVariant = args.theme;
this.render();
}
public render(): void {
const element: React.ReactElement<IDocumentsViewerProps> = React.createElement(DocumentsViewer, {
context: this.context,
groupByColumn: this.properties.groupByColumn,
themeVariant: this._themeVariant,
connectToSiteUrl: this.properties.connectToSiteUrl,
connectToListTitle: this.properties.connectToListTitle,
listTitleForFolderIcons: this.properties.listTitleForFolderIcons,
});
but i am getting these reference errors:-
Property 'context' does not exist on type 'DocumentsViewerWebPart'.
Property 'properties' does not exist on type 'DocumentsViewerWebPart'
Property 'domElement' does not exist on type 'DocumentsViewerWebPart'.
Any advice? Thanks