UNPKG

open-next-cdk

Version:

Deploy a NextJS app using OpenNext packaging to serverless AWS using CDK

18 lines (16 loc) 432 B
import { expectUnion } from "@smithy/smithy-client"; /** * @internal * * Forwards to Smithy's expectUnion function, but also ignores * the `__type` field if it is present. */ export const awsExpectUnion = (value: unknown): Record<string, any> | undefined => { if (value == null) { return undefined; } if (typeof value === "object" && "__type" in value) { delete value.__type; } return expectUnion(value); };