-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Labels
@aws-cdk/aws-lambdaRelated to AWS LambdaRelated to AWS LambdabugThis issue is a bug.This issue is a bug.effort/mediumMedium work item – several days of effortMedium work item – several days of effortp1
Description
Describe the bug
Map.jsonata does not support the assign field provided by CDK, causing a compile error.
Regression Issue
- Select this option if this issue appears to be a regression.
Last Known Working CDK Version
No response
Expected Behavior
Map.jsonata is able to set the assign field.
Current Behavior
A compile error is thrown: Object literal may only specify known properties, and 'assign' does not exist in type 'MapJsonataProps'.
Reproduction Steps
The following code causes a compile error:
const myMap = Map.jsonata(scope, "MyMap", {
items: ProvideItems.jsonata("{% $runInput %}"),
itemSelector: {
runs: "{% $states.context.Map.Item.Value %}",
},
assign: {},
})
However, the workaround for using the classic Map constructor and setting the query language to jsonata compiles correctly.
const myMap = new Map(scope, "MyMap", {
queryLanguage: QueryLanguage.JSONATA,
items: ProvideItems.jsonata("{% $runInput %}"),
itemSelector: {
runs: "{% $states.context.Map.Item.Value %}",
},
assign: {},
})
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.178.1
Framework Version
No response
Node.js Version
Node 18
OS
macOS 15.3
Language
TypeScript
Language Version
No response
Other information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-lambdaRelated to AWS LambdaRelated to AWS LambdabugThis issue is a bug.This issue is a bug.effort/mediumMedium work item – several days of effortMedium work item – several days of effortp1