Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property children is missing in ProfilerProps type #6708

Closed
3 tasks done
michalchudziak opened this issue Jan 10, 2023 · 1 comment · Fixed by #6828
Closed
3 tasks done

Property children is missing in ProfilerProps type #6708

michalchudziak opened this issue Jan 10, 2023 · 1 comment · Fixed by #6828

Comments

@michalchudziak
Copy link

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/react

SDK Version

7.26.0

Framework Version

No response

Link to Sentry event

No response

Steps to Reproduce

  1. Wrap any component with <Sentry.Profiler /> component in the TypeScript app
  2. TypeScript compiler will throw an error

Expected Result

TypeScript compiler not to throw an error when adding a child to <Sentry.Profiler>

Actual Result

Type '{ children: Element; name: string; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Profiler> & Pick<Readonly<ProfilerProps>, never> & InexactPartial<...> & InexactPartial<...>'.
  Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Profiler> & Pick<Readonly<ProfilerProps>, never> & InexactPartial<...> & InexactPartial<...>'.
@AbhiPrasad
Copy link
Member

Hey @michalchudziak - thanks for writing in!

Generally we recommend using withProfiler HOC over the Sentry.Profiler since fills in the component name, but you're right that this error shouldn't be happening.

Backlogging, but PRs are welcome to fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants