Skip to content

Commit f1ed7e0

Browse files
♻️ refactor(deepsource): fix types issues
1 parent ec8e8de commit f1ed7e0

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

src/frontend/lib/selection/selection.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import { renderHook } from "@/tests/lib/renderHook";
33
import { useStringSelections } from ".";
44

55
describe("useStringSelections", () => {
6-
it("should default to empty array", async () => {
6+
it("should default to empty array", () => {
77
const { result } = renderHook(() => useStringSelections(""));
88
expect(result.current.allSelections).toEqual([]);
99
});
1010

1111
describe("single page", () => {
12-
it("should select multiple", async () => {
12+
it("should select multiple", () => {
1313
const { result, rerender } = renderHook(() => useStringSelections(""));
1414

1515
result.current.selectMutiple(["foo", "bar"]);
@@ -30,7 +30,7 @@ describe("useStringSelections", () => {
3030
]);
3131
});
3232

33-
it("should set multiple", async () => {
33+
it("should set multiple", () => {
3434
const { result, rerender } = renderHook(() => useStringSelections(""));
3535

3636
result.current.setMultiple(["foo", "bar"]);
@@ -46,7 +46,7 @@ describe("useStringSelections", () => {
4646
expect(result.current.allSelections).toEqual(["baz", "quz", "foo"]);
4747
});
4848

49-
it("should deSelectMutiple multiple", async () => {
49+
it("should deSelectMutiple multiple", () => {
5050
const { result, rerender } = renderHook(() => useStringSelections(""));
5151

5252
result.current.selectMutiple(["foo", "bar", "baz", "quz"]);
@@ -68,7 +68,7 @@ describe("useStringSelections", () => {
6868
expect(result.current.allSelections).toEqual([]);
6969
});
7070

71-
it("should select toogle selections", async () => {
71+
it("should select toogle selections", () => {
7272
const { result, rerender } = renderHook(() => useStringSelections(""));
7373

7474
result.current.toggleSelection("foo");
@@ -86,7 +86,7 @@ describe("useStringSelections", () => {
8686
expect(result.current.allSelections).toEqual(["foo"]);
8787
});
8888

89-
it("should return correct values for isSelected", async () => {
89+
it("should return correct values for isSelected", () => {
9090
const { result, rerender } = renderHook(() => useStringSelections(""));
9191

9292
result.current.selectMutiple(["foo", "bar"]);
@@ -99,7 +99,7 @@ describe("useStringSelections", () => {
9999
expect(result.current.isSelected("baz")).toEqual(false);
100100
});
101101

102-
it("should clear all", async () => {
102+
it("should clear all", () => {
103103
const { result, rerender } = renderHook(() => useStringSelections(""));
104104

105105
result.current.selectMutiple(["foo", "bar"]);

src/frontend/views/entity/Form/ScriptForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export function ScriptForm({
5656
onSubmit={async (data) => {
5757
try {
5858
const jsString = data[`${BASE_SUFFIX}${field}`] as string;
59-
const context: ISchemaFormScriptProps<{}> = {
59+
const context: ISchemaFormScriptProps<Record<string, unknown>> = {
6060
...evaluateScriptContext,
6161
action: "test",
6262
formValues: {},

src/frontend/views/integrations/storage/Credentials.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export function StorageCredentialsSettings() {
4343

4444
useToastActionQueryError(storageCredentialsConfiguration.error);
4545

46-
const storageFormConfig: ISchemaFormConfig<{}> = {
46+
const storageFormConfig: ISchemaFormConfig<Record<string, unknown>> = {
4747
label: msg`Storage Key`,
4848
type: "text",
4949
selections: storageList.data.map((datum) => ({

src/shared/configurations/portal/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { msg } from "@lingui/macro";
22

33
import type { IAppConfigurationBag } from "@/shared/configurations/types";
44

5-
export type IPortalSystemSettings = {};
5+
export type IPortalSystemSettings = Record<string, unknown>;
66

77
export const PORTAL_DEFAULT_SYSTEM_SETTINGS = {};
88

src/shared/lib/strings/__tests__/templates.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { compileTemplateString } from "../templates";
22

33
describe("Template service", () => {
4-
it("should compiles templates successfully", async () => {
4+
it("should compiles templates successfully", () => {
55
expect(
66
compileTemplateString("{{ name }} is {{ age }}", {
77
name: "John",
@@ -16,23 +16,23 @@ describe("Template service", () => {
1616
).toEqual("{ name } is 23");
1717
});
1818

19-
it("should returns empty string for undefined template", async () => {
19+
it("should returns empty string for undefined template", () => {
2020
expect(
2121
compileTemplateString("{ name } is {{ age }}", {
2222
name: "John",
2323
})
2424
).toEqual("{ name } is ");
2525
});
2626

27-
it("should compile objects", async () => {
27+
it("should compile objects", () => {
2828
expect(
2929
compileTemplateString("{{ person.name }}", {
3030
person: { name: "John" },
3131
})
3232
).toEqual("John");
3333
});
3434

35-
it("should return error message", async () => {
35+
it("should return error message", () => {
3636
expect(
3737
compileTemplateString(undefined, {
3838
person: { name: "John" },

src/translations/utils.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export async function getServerSideProps(
2626

2727
function useLinguiInit(messages: Messages) {
2828
const router = useRouter();
29-
const locale = router.locale || router.defaultLocale!;
29+
const locale = router.locale || router.defaultLocale;
3030
const isClient = typeof window !== "undefined";
3131

3232
if (!isClient && locale !== i18n.locale) {

0 commit comments

Comments
 (0)