Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix studio type errors

Alaister Young69a26e3893e6
diff --git a/studio/components/interfaces/Settings/Logs/Logs.utils.ts b/studio/components/interfaces/Settings/Logs/Logs.utils.ts
index 24e42b749fa..fa076635e7c 100644
--- a/studio/components/interfaces/Settings/Logs/Logs.utils.ts
+++ b/studio/components/interfaces/Settings/Logs/Logs.utils.ts
@@ -8,7 +8,6 @@ import BackwardIterator from 'components/to-be-cleaned/SqlEditor/BackwardIterato
import { uniqBy } from 'lodash'
import { useEffect } from 'react'
-
/**
* Convert a micro timestamp from number/string to iso timestamp
*/
@@ -271,11 +270,10 @@ export const ensureNoTimestampConflict = (
}
}
-
/**
* Adds SQL code hints to logs explorer code editor
*/
-export const useEditorHints = ()=>{
+export const useEditorHints = () => {
const monaco = useMonaco()
useEffect(() => {
@@ -337,7 +335,7 @@ export const useEditorHints = ()=>{
suggestions: uniqBy(suggestions, 'label'),
}
},
- }
+ } as any
// register completion item provider for pgsql
const completeProvider = monaco.languages.registerCompletionItemProvider(
@@ -350,4 +348,4 @@ export const useEditorHints = ()=>{
}
}
}, [monaco])
-}
\ No newline at end of file
+}
diff --git a/studio/components/ui/InfiniteList.tsx b/studio/components/ui/InfiniteList.tsx
index 60619509629..615cbfcf929 100644
--- a/studio/components/ui/InfiniteList.tsx
+++ b/studio/components/ui/InfiniteList.tsx
@@ -82,8 +82,8 @@ function InfiniteList<T>({
{({ onItemsRendered, ref }) => (
<VariableSizeList
ref={ref}
- height={height}
- width={width}
+ height={height ?? 0}
+ width={width ?? 0}
itemCount={itemCount}
itemData={itemData}
itemSize={getItemSize}
diff --git a/studio/stores/common/PostgresMetaInterface.ts b/studio/stores/common/PostgresMetaInterface.ts
index c11e782498a..2d03eb347b7 100644
--- a/studio/stores/common/PostgresMetaInterface.ts
+++ b/studio/stores/common/PostgresMetaInterface.ts
@@ -140,7 +140,7 @@ export default class PostgresMetaInterface<T> implements IPostgresMetaInterface<
.filter((item: any) => item.schema !== schema)
const formattedPurgedData = keyBy(purgedData, this.identifier)
- this.data = { ...formattedPurgedData, ...formattedData }
+ this.data = { ...formattedPurgedData, ...formattedData } as any
this.setState(LOADED)
return data
@@ -154,7 +154,7 @@ export default class PostgresMetaInterface<T> implements IPostgresMetaInterface<
initialDataArray(value: T[]) {
if (this.state === this.STATES.INITIAL) {
- this.data = keyBy(value, this.identifier)
+ this.data = keyBy(value, this.identifier) as any
this.state = this.STATES.LOADED
}
}
@@ -164,7 +164,7 @@ export default class PostgresMetaInterface<T> implements IPostgresMetaInterface<
}
setDataArray(value: T[]) {
- this.data = keyBy(value, this.identifier)
+ this.data = keyBy(value, this.identifier) as any
}
setError(value: any) {