Use semicolons to delimit interface members

This commit is contained in:
Alexis Sellier
2021-06-10 10:58:10 +02:00
parent 97d3ae0bfd
commit 0b6d60c69a
6 changed files with 37 additions and 37 deletions
+6 -6
View File
@@ -98,12 +98,12 @@ function createCanvas(
}
export interface Options {
seed: string
size: number
scale: number
color?: string
bgcolor?: string
spotcolor?: string
seed: string;
size: number;
scale: number;
color?: string;
bgcolor?: string;
spotcolor?: string;
}
export function createIcon(opts: Options): HTMLCanvasElement {
+8 -8
View File
@@ -10,28 +10,28 @@ declare global {
interface ImportMeta {
env: {
RADICLE_ALCHEMY_API_KEY: string | null,
RADICLE_HTTP_API: string | null,
}
RADICLE_ALCHEMY_API_KEY: string | null;
RADICLE_HTTP_API: string | null;
};
}
}
export class Config {
network: { name: string, chainId: number };
registrar: { address: string, domain: string };
network: { name: string; chainId: number };
registrar: { address: string; domain: string };
radToken: { address: string };
orgFactory: { address: string };
orgs: { subgraph: string, contractHash: string };
orgs: { subgraph: string; contractHash: string };
gasLimits: { createOrg: number };
provider: ethers.providers.JsonRpcProvider;
signer: ethers.Signer & TypedDataSigner | null;
safe: { api: string | null, viewer: string | null };
safe: { api: string | null; viewer: string | null };
abi: { [contract: string]: string[] }
seed: { api: string | null };
tokens: string[];
constructor(
network: { name: string, chainId: number },
network: { name: string; chainId: number },
provider: ethers.providers.JsonRpcProvider,
signer: ethers.Signer & TypedDataSigner | null,
) {
+3 -3
View File
@@ -1,9 +1,9 @@
import { writable } from "svelte/store";
export interface Err {
type: Failure,
txHash?: string,
message?: string,
type: Failure;
txHash?: string;
message?: string;
}
export enum Failure {
+9 -9
View File
@@ -1,22 +1,22 @@
import type { Config } from '@app/config';
export interface Project {
id: string
id: string;
anchor: {
stateHash: string
stateHashFormat: string
}
stateHash: string;
stateHashFormat: string;
};
}
export interface Person {
urn: string
avatar: { emoji: string, background: { r: number, g: number, b: number } }
urn: string;
avatar: { emoji: string; background: { r: number; g: number; b: number } };
}
export interface Meta {
name: string
description: string
maintainers: Person[]
name: string;
description: string;
maintainers: Person[];
}
export interface Author {
+7 -7
View File
@@ -13,20 +13,20 @@ export enum Connection {
export type TxState =
{ state: 'signing' }
| { state: 'pending', hash: string }
| { state: 'success', hash: string, blockHash: string, blockNumber: number }
| { state: 'fail', hash: string, blockHash: string, blockNumber: number, error: string }
| { state: 'pending'; hash: string }
| { state: 'success'; hash: string; blockHash: string; blockNumber: number }
| { state: 'fail'; hash: string; blockHash: string; blockNumber: number; error: string }
| null;
export type State =
{ connection: Connection.Disconnected }
| { connection: Connection.Connecting }
| { connection: Connection.Connected, session: Session };
| { connection: Connection.Connected; session: Session };
export interface Session {
address: string
tokenBalance: BigNumber
tx: TxState
address: string;
tokenBalance: BigNumber;
tx: TxState;
}
export interface Store extends Readable<State> {
+4 -4
View File
@@ -12,9 +12,9 @@ export enum AddressType {
}
export interface Safe {
address: string
owners: string[]
threshold: number
address: string;
owners: string[];
threshold: number;
}
export function formatBalance(n: BigNumber): string {
@@ -189,7 +189,7 @@ export async function getSafe(address: string, config: Config): Promise<Safe | n
// Get token balances for an address.
export async function getTokens(address: string, config: Config):
Promise<Array<{ tokenName: string, tokenLogo: string }>>
Promise<Array<{ tokenName: string; tokenLogo: string }>>
{
await config.provider.send("alchemy_getTokenBalances", [address, config.tokens]);