forked from liteflow-labs/starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtype.d.ts
33 lines (29 loc) · 822 Bytes
/
type.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
interface Window {
ethereum?: {
isMetaMask?: true
on?: (...args: any[]) => void
removeListener?: (...args: any[]) => void
autoRefreshOnNetworkChange?: boolean
}
web3?: Record<string, unknown>
}
declare module '@pinata/ipfs-gateway-tools/dist/node' {
export default class IPFSGatewayTools {
constructor()
containsCID(url: string): { containsCid: boolean; cid: string | null }
convertToDesiredGateway(
sourceUrl: string,
desiredGatewayPrefix: string,
): string
}
}
type UUID = string
type URI = string
type Falsy = false | 0 | '' | null | undefined
interface Array<T> {
// Ensure mapping like `array.filter(Boolean)` actually return a type with no falsy value
filter<S extends T>(
predicate: BooleanConstructor,
thisArg?: any,
): Exclude<S, Falsy>[]
}