Skip to content

Commit

Permalink
wip: type updates
Browse files Browse the repository at this point in the history
  • Loading branch information
legobeat committed Aug 30, 2023
1 parent c0ca9ac commit 083b98b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/snaps-utils/src/cronjob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ import {
export const CronjobRpcRequestStruct: Struct<

Check failure on line 19 in packages/snaps-utils/src/cronjob.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test / Build types

Type 'Struct<{ params?: unknown; method: string; id?: string | number | null | undefined; jsonrpc?: "2.0" | undefined; }, { params?: Struct<Record<string, Json> | Json[], null> | undefined; method: Struct<...>; id: Struct<...>; jsonrpc: Struct<...>; }>' is not assignable to type 'Struct<{ method: string; params?: Record<string, Json> | Json[] | undefined; id?: string | number | null | undefined; jsonrpc?: "2.0" | undefined; }, { params?: Struct<Record<string, Json> | Json[], null> | undefined; method: Struct<...>; id?: Struct<...> | undefined; jsonrpc?: Struct<...> | undefined; }>'.
{
method: string;
params?: Record<string, Json> | Json[] | undefined;
id?: string | number | null | undefined;
jsonrpc?: '2.0' | undefined;
params?: Record<string, Json> | Json[];
id?: string | number | null;
jsonrpc?: '2.0';
},
{
params: Struct<Record<string, Json> | Json[] | undefined, null>;
params?: Struct<Record<string, Json> | Json[], null>;
method: Struct<string, null>;
id: Struct<string | number | null | undefined>;
jsonrpc: Struct<'2.0' | undefined>;
id?: Struct<string | number | null>;
jsonrpc?: Struct<'2.0'>;
}
> = assign(
partial(pick(JsonRpcRequestStruct, ['id', 'jsonrpc'])),

Check failure on line 33 in packages/snaps-utils/src/cronjob.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test / Build types

Argument of type 'Struct<{ id: string | number | null; jsonrpc: "2.0"; method: string; params?: Record<string, Json> | Json[] | undefined; }, { id: Struct<string | number | null, null>; jsonrpc: Struct<...>; method: Struct<...>; params?: Struct<...> | undefined; }>' is not assignable to parameter of type 'Struct<{ params?: unknown; id: string | number | null; jsonrpc: "2.0"; method: string; }, { id: Struct<string | number | null, null>; jsonrpc: Struct<"2.0", "2.0">; method: Struct<string, null>; params?: Struct<...> | undefined; }>'.
Expand Down

0 comments on commit 083b98b

Please sign in to comment.