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

(v2) feat!: make transform an interface type #417

Open
wants to merge 1 commit into
base: v2-exp
Choose a base branch
from

Conversation

aymanbagabas
Copy link
Member

This change introduces a new Transform type with a canonical implementation TransformFunc that can be used to transform a string at render time. This change also updates the Style type to use the new Transform type instead of a function type.

We need this to support complex transforms and to be able to compare styles using the == operator.

@aymanbagabas aymanbagabas force-pushed the v2-transform branch 3 times, most recently from 49011fc to ab090b0 Compare October 29, 2024 19:45
@aymanbagabas aymanbagabas changed the title feat!: make transform an interface type (v2) feat!: make transform an interface type Oct 29, 2024
@aymanbagabas aymanbagabas added this to the v2.0.0 milestone Oct 29, 2024
set.go Show resolved Hide resolved
This change introduces a new `Transform` type with a canonical implementation
`TransformFunc` that can be used to transform a string at render time. This
change also updates the `Style` type to use the new `Transform` type instead of
a function type.

We need this to support complex transforms and to be able to compare styles
using the `==` operator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants