# SDK Parameter Bug Workaround?

**URL:** <https://discuss.circleci.com/t/sdk-parameter-bug-workaround/46737>\
**Category:** Bug Reports\
**Tags:** dynamic-config, config-sdk\
**Created:** [January 16, 2023, 3:33pm UTC](https://discuss.circleci.com/t/sdk-parameter-bug-workaround/46737 "2023-01-16T15:33:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xavientois](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/xavientois/32/28667_2.png) [@Xavientois](https://discuss.circleci.com/u/Xavientois)\
**Post date:** [January 16, 2023, 3:33pm UTC](https://discuss.circleci.com/t/sdk-parameter-bug-workaround/46737/1 "2023-01-16T15:33:23Z")

</div>

My team is really excited to start using the SDK for dynamic config.  
We have set up one of our repos to entirely use the SDK to generate its workflows. Unfortunately, it does not work due to this bug: [Bug: Parameters with typeof `steps` are not generated correctly · Issue #161 · CircleCI-Public/circleci-config-sdk-ts · GitHub](https://github.com/CircleCI-Public/circleci-config-sdk-ts/issues/161)

Is there a timeline for when it might be fixed or any way to work around this until then?

Thanks!

---

<div class="post-metadata">

**Author:** ![KyleTryon](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/kyletryon/32/9977_2.png) [@KyleTryon](https://discuss.circleci.com/u/KyleTryon)\
**Post date:** [January 19, 2023, 4:41pm UTC](https://discuss.circleci.com/t/sdk-parameter-bug-workaround/46737/2 "2023-01-19T16:41:29Z")

</div>

Hey @Xavientois 👋

Thanks for sharing this with us, love to hear you’re excited about the SDK!

I just posted a new PR, would you be interested in trying it out and/or giving it a review?

> <https://github.com/CircleCI-Public/circleci-config-sdk-ts/pull/176>
>
> This PR aims to address #161. WorkflowJobs no longer have specific properties fo…r \`preSteps\` or \`postSteps\`, instead these are now expected to be passed as additional parameters within the parameters object.
> 
> The new syntax for using pre/postSteps:
> 
> \`\`\`ts
> myWorkflow.addJob(job, {
> name: 'custom-name',
> preSteps: \[helloWorld\],
> postSteps: \[helloWorld\],
> });
> \`\`\`
> 
> This will produce the following output:
> 
> \`\`\`yaml
> my-workflow:
> jobs:
> - my-job:
> name: custom-name
> pre-steps:
> - run: echo hello world
> post-steps:
> - run: echo hello world
> \`\`\`\`
> 
> \---
> 
> Additionally, this PR resolves an issue I came across in testing that does not appear reported. Previously the \`when\` key for workflows appeared to be required and would output an undefined value. This key will no longer be added if undefined.
