-
Notifications
You must be signed in to change notification settings - Fork 32
chore: Remove/Convert a couple files to TS, shared utils Part 2 #3481
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,9 @@ describe('camelizeKeys', () => { | |
|
||
it('else passes through', () => { | ||
expect(camelizeKeys([1, 2, 3])).toStrictEqual([1, 2, 3]) | ||
// @ts-expect-error | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Kept these since it looked like we were testing for these cases?¿ |
||
expect(camelizeKeys(1)).toStrictEqual(1) | ||
// @ts-expect-error | ||
expect(camelizeKeys('test')).toStrictEqual('test') | ||
expect(camelizeKeys()).toStrictEqual({}) | ||
}) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
import camelCase from 'lodash/camelCase' | ||
|
||
export function camelizeKeys(obj = {}) { | ||
export function camelizeKeys( | ||
obj: Record<string, any> = {} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Slightly stricter/more relevant typing than any, hoping this doesn't come back to bite but Ill keep an eye on it |
||
): Record<string, any> { | ||
if (Array.isArray(obj)) { | ||
return obj.map((v) => camelizeKeys(v)) | ||
} else if (obj !== null && obj.constructor === Object) { | ||
|
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
export * from './ownerHelpers' | ||
export * from './provider' | ||
export * from './exceptions' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If it's not too much work, I feel like we can just get rid of this file completely at this point. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can do, I'll remove it in #3461 when I'm done cooking that one (its been a mega pain) |
This file was deleted.
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.
Seemed to be a lingering reference of legacyCharts utils