Files
personal_site/frontend/node_modules/@aws-amplify/backend/lib/backend.d.ts
T

20 lines
1.0 KiB
TypeScript

import { ConstructFactory, DeepPartialAmplifyGeneratedConfigs, ResourceAccessAcceptorFactory, ResourceProvider } from '@aws-amplify/plugin-types';
import { Stack } from 'aws-cdk-lib';
import { ClientConfig } from '@aws-amplify/client-config';
export type BackendBase = {
createStack: (name: string) => Stack;
addOutput: (clientConfigPart: DeepPartialAmplifyGeneratedConfigs<ClientConfig>) => void;
stack: Stack;
};
export type DefineBackendProps = Record<string, ConstructFactory<ResourceProvider & Partial<ResourceAccessAcceptorFactory<never>>>> & {
[K in keyof BackendBase]?: never;
};
/**
* Use `defineBackend` to create an instance of this type.
* This object has the Amplify BackendBase methods on it for interacting with the backend.
* It also has dynamic properties based on the resources passed into `defineBackend`
*/
export type Backend<T extends DefineBackendProps> = BackendBase & {
[K in keyof T]: Omit<ReturnType<T[K]['getInstance']>, keyof ResourceAccessAcceptorFactory>;
};
//# sourceMappingURL=backend.d.ts.map