Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Support shorthand properties in Stencils #2752

Conversation

NicholasBoll
Copy link
Member

Summary

Support shorthand properties in Stencils for variables.

Release Category

Styling


For example:

const myStencil = createStencil({
  vars: {
    color: 'red',
  },
  base({ color }) => ({
    color // shorthand property wasn't supported
  })
})

@NicholasBoll NicholasBoll added the ready for review Code is ready for review label May 21, 2024
@github-actions github-actions bot requested a review from alanbsmith May 21, 2024 19:44
Copy link

cypress bot commented May 21, 2024

Passing run #7342 ↗︎

0 970 3 0 Flakiness 0

Details:

Merge bfbe4e1 into 7533a39...
Project: canvas-kit Commit: 8b1841b256 ℹ️
Status: Passed Duration: 05:09 💡
Started: May 21, 2024 7:47 PM Ended: May 21, 2024 7:52 PM

Review all test suite changes for PR #2752 ↗︎

@@ -105,6 +105,15 @@ function parsePropertyToStaticValue(node: ts.Node, context: TransformerContext):
}
}

// { name }
if (ts.isShorthandPropertyAssignment(node)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of this function is clear enough, but I can't find any docs on this function. Bizarre.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is almost no documentation on any TypeScript AST or Type Checker functions. There's no JSDoc. The source code is all I get: https://github.com/microsoft/TypeScript

@NicholasBoll NicholasBoll added automerge and removed ready for review Code is ready for review labels May 21, 2024
@alanbsmith alanbsmith merged commit 48f9234 into Workday:prerelease/major May 21, 2024
23 of 24 checks passed
@NicholasBoll NicholasBoll deleted the fix/support-shorthand-properties branch August 30, 2024 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants