TypeScript errors in PolarisErrorBoundary #39
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description:
TypeScript compilation fails with errors in
src/index.tsxrelated to thePolarisErrorBoundaryclass component.Errors:
Steps to reproduce:
npm installnpm run tscExpected: TypeScript should compile without errors
Actual: 5 TypeScript errors related to React.Component typing
Tests: 77 unit tests pass
Additional context:
Cannot Reproduce — TypeScript Compiles Clean
I investigated this issue thoroughly:
npm run tsc(tsc --noEmit) passes with zero errors (TypeScript 5.6.2)PolarisErrorBoundaryalready has correct generic params:extends React.Component<{ children: React.ReactNode }, ErrorBoundaryState>The reported errors (
TS2339: Property 'props' does not exist,TS2786: cannot be used as a JSX component) would occur if the class lacked explicit generic type parameters, but the current code already has them.This may have been resolved by PR #37 (which removed stale type references from
tsconfig.json) or was environment-specific. Closing as fixed.Verification steps:
Closing — cannot reproduce. TypeScript compiles clean on current main.