@mincloudx/types
v0.4.2
Published
Common TypeScript types in MinCloud.
Downloads
7
Maintainers
Readme
@mincloudx/types
Common TypeScript types in MinCloud.
Usage
pnpm install @mincloudx/types
# or use npm
npm install @mincloudx/types
When we need to import the corresponding types, we can do so through the import statement:
import type { FaaS } from '@mincloudx/types';
interface EventData {
productId: string;
name?: string;
}
export default async function userDefinedFunctionProxy(
evt: FaaS.Event<EventData>,
) {
const { productId, name = 'mincloudx' } = evt.data;
return `${name}_${productId}`;
}