-
Notifications
You must be signed in to change notification settings - Fork 142
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
♻️ Simplify RUM assembly #1588
♻️ Simplify RUM assembly #1588
Conversation
@@ -181,7 +181,7 @@ export type RawRumEvent = | |||
| RawRumLongTaskEvent | |||
| RawRumActionEvent | |||
|
|||
export interface RumContext { | |||
export interface RumContext extends Context { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💬 suggestion: we need to extend Context
here just to work around the Index signature for type 'string' is missing in type ...
error, but RumContext
is never actually used with an index, except when using combine
.
Maybe we could remove the extends
here, and cast the object as RumContext & Context
where RumContext
is used with combine
. WDYT?
I know this is a bit confusing, and there is a long standing TS issue related to that.
id: viewContext.view.id, | ||
name: viewContext.view.name, | ||
url: urlContext.view.url, | ||
referrer: urlContext.view.referrer, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥜 nitpick: maybe remove the view
extra-level from those contexts
565e2c4
to
b7923d7
Compare
b7923d7
to
7721941
Compare
Motivation
RUM assembly has a quite convoluted logic to handle the various contexts. More precisely:
Context
making us beleave they can contain any attribute ([x: string]: ContextValue
) which is false.Changes
Testing
I have gone over the contributing documentation.