mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-26 10:21:55 +00:00
chore: Update to fix the types
This commit is contained in:
@@ -1,25 +1,28 @@
|
||||
import { Config } from "../config/builder/config"
|
||||
import { SDKManifest } from "../manifest/ManifestTypes"
|
||||
import { Address, Effects } from "../types"
|
||||
import { Utils } from "../util/utils"
|
||||
import { AddressReceipt } from "./AddressReceipt"
|
||||
|
||||
export type InterfacesReceipt = Array<Address[] & AddressReceipt>
|
||||
export type SetInterfaces<
|
||||
Manifest extends SDKManifest,
|
||||
Store,
|
||||
ConfigInput extends Record<string, any>,
|
||||
Output extends InterfacesReceipt,
|
||||
> = (opts: {
|
||||
effects: Effects
|
||||
input: null | ConfigInput
|
||||
utils: Utils<Store>
|
||||
utils: Utils<Manifest, Store>
|
||||
}) => Promise<Output>
|
||||
export type SetupInterfaces = <
|
||||
Manifest extends SDKManifest,
|
||||
Store,
|
||||
ConfigInput extends Record<string, any>,
|
||||
Output extends InterfacesReceipt,
|
||||
>(
|
||||
config: Config<ConfigInput, Store>,
|
||||
fn: SetInterfaces<Store, ConfigInput, Output>,
|
||||
) => SetInterfaces<Store, ConfigInput, Output>
|
||||
fn: SetInterfaces<Manifest, Store, ConfigInput, Output>,
|
||||
) => SetInterfaces<Manifest, Store, ConfigInput, Output>
|
||||
export const NO_INTERFACE_CHANGES = [] as InterfacesReceipt
|
||||
export const setupInterfaces: SetupInterfaces = (_config, fn) => fn
|
||||
|
||||
Reference in New Issue
Block a user