mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 18:31:52 +00:00
29 lines
1011 B
TypeScript
29 lines
1011 B
TypeScript
import { Config } from "../config/builder/config"
|
|
import { SDKManifest } from "../manifest/ManifestTypes"
|
|
import { AddressInfo, Effects } from "../types"
|
|
import { Utils } from "../util/utils"
|
|
import { AddressReceipt } from "./AddressReceipt"
|
|
|
|
export type InterfacesReceipt = Array<AddressInfo[] & AddressReceipt>
|
|
export type SetInterfaces<
|
|
Manifest extends SDKManifest,
|
|
Store,
|
|
ConfigInput extends Record<string, any>,
|
|
Output extends InterfacesReceipt,
|
|
> = (opts: {
|
|
effects: Effects
|
|
input: null | ConfigInput
|
|
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<Manifest, Store, ConfigInput, Output>,
|
|
) => SetInterfaces<Manifest, Store, ConfigInput, Output>
|
|
export const NO_INTERFACE_CHANGES = [] as InterfacesReceipt
|
|
export const setupInterfaces: SetupInterfaces = (_config, fn) => fn
|