layer5io/sistent

`ErrorBoundary` type errors

Closed this issue Β· 0 comments

Current Behavior

Output from building in v0.15.0 after moving to single package on the open PR:

src/custom/ErrorBoundary/ErrorBoundary.tsx(70,54): error TS2322: Type '(error: Error, info: {    componentStack: string;}) => void' is not assignable to type '(error: Error, info: ErrorInfo) => void'.
  Types of parameters 'info' and 'info' are incompatible.
    Type 'ErrorInfo' is not assignable to type '{ componentStack: string; }'.
      Types of property 'componentStack' are incompatible.
        Type 'string | null | undefined' is not assignable to type 'string'.
          Type 'undefined' is not assignable to type 'string'.
src/custom/ErrorBoundary/ErrorBoundary.tsx(102,54): error TS2322: Type '(error: Error, info: {    componentStack: string;}) => void' is not assignable to type '(error: Error, info: ErrorInfo) => void'.

Expected Behavior

ErrorBoundary shouldn't have any type errors.

Screenshots/Logs

Environment

  • Host OS: Mac Linux Windows
  • Platform: Docker or Kubernetes
  • Meshery Server Version: stable-v
  • Meshery Client Version: stable-v

Contributor Guides and Resources