-
Notifications
You must be signed in to change notification settings - Fork 10
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
clint - pr feedback for #78 #83
Conversation
if (!this._isActive) { | ||
return | ||
} |
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.
prefer to short circuit over indent
this._shims[logLevel as ConsoleLevels] = undefined; | ||
} | ||
this._isActive = false; | ||
let logLevel: ConsoleLevels; |
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.
we can drop all the casts by strongly typing the key.
@@ -73,6 +72,7 @@ declare global { | |||
fsTagName?: string; | |||
} | |||
} | |||
let __turboModuleProxy: boolean; |
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.
define the variable on the global scope
src/logging/consoleCapture.ts
Outdated
@@ -44,7 +43,6 @@ const logEvent = (level: LogLevel, args: ArrayLike<unknown>) => { | |||
}; | |||
|
|||
// A naive version of ConsoleWatcher on web. | |||
// See https://github.com/cowpaths/mn/blob/865353f374b687e481d3b230e7eec8e1d7be2eb4/projects/fullstory/packages/recording/src/consolewatcher.ts |
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.
doesn't seem useful to ref an internal repo
src/logging/consoleCapture.ts
Outdated
@@ -30,7 +29,7 @@ type ConsoleLevels = keyof typeof consoleLevelMap; | |||
type MethodShim = Record<'native' | 'override', Function>; | |||
|
|||
type ConsoleShims = { | |||
[K in keyof typeof consoleLevelMap]?: MethodShim | null; |
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.
keyof typeof consoleLevelmap
is already defined above as ConsoleLevels
23dcb27
to
ac6011c
Compare
No description provided.