import type { IConstruct, IMixin } from 'constructs'; import { CfnResource } from '../cfn-resource'; import type { IMergeStrategy } from '../mixins/property-merge-strategy'; /** * Options for CfnPropsMixin */ export interface CfnPropsMixinOptions { /** * Strategy for merging properties * * @default - PropertyMergeStrategy.combine() */ readonly strategy?: IMergeStrategy; } /** * Recursively makes all properties optional. */ type DeepPartial = T extends object ? { [K in keyof T]?: DeepPartial; } : T; /** * Extract writable, non-function own properties from a CfnResource subclass. * Excludes inherited CfnResource/CfnElement/CfnRefElement members and readonly attributes. */ type CfnWritableProps = { [K in keyof T as K extends keyof CfnResource ? never : T[K] extends Function ? never : K extends `attr${string}` ? never : K extends 'cdkTagManager' ? never : K]: T[K]; }; /** * A generic, type-safe mixin for applying L1 CloudFormation properties. * * Usage: * ```ts * new s3.Bucket(this, 'Bucket') * .with(new CfnPropsMixin(s3.CfnBucket, { * versioningConfiguration: { status: 'Enabled' }, * })); * ``` */ export declare class CfnPropsMixin implements IMixin { /** * Create a CfnPropsMixin without importing the resource class (avoids circular deps). * Requires an explicit type parameter for autocomplete: `CfnPropsMixin.of(...)`. */ static of(cfnResourceTypeName: string, props: DeepPartial>, options?: CfnPropsMixinOptions): CfnPropsMixin; private readonly cfnResourceType; private readonly props; private readonly propertyKeys; private readonly strategy; constructor(resourceClass: (abstract new (...args: any[]) => T) & { readonly CFN_RESOURCE_TYPE_NAME: string; }, props: DeepPartial>, options?: CfnPropsMixinOptions); supports(construct: IConstruct): boolean; applyTo(construct: IConstruct): void; } export {};