Skip to content

Commit

Permalink
More lax typing for meta
Browse files Browse the repository at this point in the history
  • Loading branch information
marcvelmer committed Jul 21, 2023
1 parent b0258eb commit 325aa9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ export class VocdoniSDKClient {
}

if (election.census instanceof TokenCensus) {
election.meta = { ...election.meta, ...{ token: election.census.token as any } };
election.meta = { ...election.meta, ...{ token: election.census.token } };
}

const electionData = Promise.all([
Expand Down
4 changes: 2 additions & 2 deletions src/types/election/election.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ export interface IElectionType {
anonymous?: boolean;
}

type AnyJson = boolean | number | string | null | JsonArray | JsonMap;
type AnyJson = boolean | number | string | null | JsonArray | JsonMap | any;
interface JsonMap {
[key: string]: AnyJson;
}
interface JsonArray extends Array<AnyJson> {}

export type ElectionMeta = JsonArray | JsonMap;
export type ElectionMeta = AnyJson | JsonArray | JsonMap;

/**
* Define election parameters.
Expand Down

0 comments on commit 325aa9f

Please sign in to comment.