Skip to content

Commit

Permalink
Apply suggestion from code reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Dec 5, 2023
1 parent 95629da commit bd5bc3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions packages/@uppy/utils/src/Translator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ export interface Locale<T extends number = number> {
}

export type OptionalPluralizeLocale<T extends number = number> =
| (Omit<Locale<T>, 'pluralize'> & {
pluralize?: (n: number) => T
})
| (Omit<Locale<T>, 'pluralize'> & Partial<Pick<Locale<T>, 'pluralize'>>)
| undefined

// eslint-disable-next-line no-use-before-define
Expand All @@ -18,7 +16,7 @@ export type I18n = Translator['translate']
type Options = {
smart_count?: number
} & {
[key: string]: string | number | undefined
[key: string]: string | number
}

function insertReplacement(
Expand Down
4 changes: 2 additions & 2 deletions packages/@uppy/utils/src/findDOMElement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import isDOMElement from './isDOMElement.ts'
* Find a DOM element.
*/
export default function findDOMElement(
element: HTMLElement | string,
element: Node | string,
context = document,
): HTMLElement | null {
): Element | null {
if (typeof element === 'string') {
return context.querySelector(element)
}
Expand Down

0 comments on commit bd5bc3e

Please sign in to comment.