Getting an error when trying to create spfxContext in SPFx framework. At that time getting the below error.
Type 'WebPartContext' is not assignable to type 'ISPFXContext'.
The types of 'msGraphClientFactory.getClient' are incompatible between these types.
Type '(version: "3") => Promise<MSGraphClientV3>' is not assignable to type '() => Promise<any>'
The types of 'msGraphClientFactory.getClient' are incompatible between these types.
Type '(version: "3") => Promise<MSGraphClientV3>' is not assignable to type '() => Promise<any>'
Solution
spfxContext: this.context as any