Pulumi Node.js component schema inference supports `Partial<T>`
Introduced 2026-02-17 · score 0.91
HOW TO USE IT
When inferring a Node.js component schema from arguments, wrap the property type in `Partial<T>` to generate a corresponding type with all properties optional.
interface SomeType {
a: string;
}
export interface MyComponentArgs {
regularType?: pulumi.Input<SomeType>;
partialType?: pulumi.Input<Partial<SomeType>>;
}WHY THIS HELPS
Infer a component schema from Node.js component arguments that use `Partial<T>`.
REQUIREMENTS AND LIMITATIONS
- Version: v3.221.0
- Partial<T> (required): Wrap the property type `T`; inferred type properties are all optional.
- T (required): The source interface or type whose properties are made optional.
- pulumi.Input<T>: Supported wrapper around the argument type in the documented example; `partialType` itself is optional because it uses `?`.
- Prerequisite: For source-based component schema inference, define component arguments as a TypeScript interface reachable through normal imports, and use `pulumi.Input` types for arguments.
- Prerequisite: Node.js runtime and Pulumi CLI are listed as component-building prerequisites.
FIRST-PARTY EVIDENCE
- https://github.com/pulumi/pulumi/releases/tag/v3.221.0
- https://github.com/pulumi/pulumi/pull/21802
- https://www.pulumi.com/docs/iac/guides/building-extending/packages/source-based-plugin/
- https://www.pulumi.com/docs/iac/guides/building-extending/components/build-a-component/
Check the installed version and the source before using it. Entry JSON