Преглед на файлове

chore: remove unused undefined union options

Connor Prussin преди 8 месеца
родител
ревизия
8a21b2aece

+ 1 - 1
apps/api-reference/src/components/Code/use-highlighted-code.tsx

@@ -47,7 +47,7 @@ const useHighlighter = () => {
 export const useHighlightedCode = (
   language: SupportedLanguage | undefined,
   code: string,
-  dimRange?: readonly [OffsetOrPosition, OffsetOrPosition] | undefined,
+  dimRange?: readonly [OffsetOrPosition, OffsetOrPosition],
 ) => {
   const highlighter = useHighlighter();
   const decorations = useMemo(

+ 1 - 1
apps/insights/src/components/PriceName/index.tsx

@@ -9,7 +9,7 @@ export const PriceName = ({ assetClass, uppercase, plural }: Props) =>
     uppercase ? "upcase" : "title"
   ];
 
-const getLabels = (assetClass?: string | undefined) => {
+const getLabels = (assetClass?: string) => {
   if (assetClass === undefined) {
     return LABELS.ambiguous;
   } else {

+ 5 - 7
apps/insights/src/hooks/use-query-param-filter-pagination.ts

@@ -16,13 +16,11 @@ export const useQueryParamFilterPagination = <T>(
   items: T[],
   predicate: (item: T, term: string) => boolean,
   doSort: (a: T, b: T, descriptor: SortDescriptor) => number,
-  options?:
-    | {
-        defaultPageSize?: number | undefined;
-        defaultSort?: string | undefined;
-        defaultDescending?: boolean;
-      }
-    | undefined,
+  options?: {
+    defaultPageSize?: number | undefined;
+    defaultSort?: string | undefined;
+    defaultDescending?: boolean;
+  },
 ) => {
   const logger = useLogger();
 

+ 1 - 1
apps/staking/src/api.ts

@@ -102,7 +102,7 @@ export const loadData = async (
   client: PythStakingClient,
   pythnetClient: PythnetClient,
   hermesClient: HermesClient,
-  stakeAccount?: PublicKey | undefined,
+  stakeAccount?: PublicKey,
   simulationPayer?: PublicKey,
 ): Promise<Data> =>
   stakeAccount === undefined

+ 1 - 1
packages/component-library/src/Table/index.tsx

@@ -226,7 +226,7 @@ const cellProps = <T extends string>(
     ColumnConfig<T>,
     "alignment" | "width" | "fill" | "sticky" | "className"
   >,
-  extraClassName?: string | undefined,
+  extraClassName?: string,
   extraStyle?: CSSProperties,
 ) => ({
   className: clsx(styles.cell, extraClassName, className),