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

Initial support for FormattableString #2460

Merged
merged 1 commit into from
Jun 3, 2021
Merged

Conversation

alfonsogarciacaro
Copy link
Member

Fixes #1973

This PR adds support for:

  • FormattableString.Format
  • FormattableString.ArgumentCount
  • FormattableString.GetArgument()
  • FormattableString.GetArguments(index)
  • FormattableStringFactory.Create: this happens when assigning an interpolated string to a variable of FormattableString or passing it to a function that accepts FormattableString as argument.
let s: FormattableString = $"You owe: {orderAmount:N5} {3} {5 = 5}"

let convert (s: FormattableString) = s
let s = convert $"You owe: {orderAmount:N5} {3} {5 = 5}"

@alfonsogarciacaro alfonsogarciacaro merged commit 8066e97 into main Jun 3, 2021
@alfonsogarciacaro
Copy link
Member Author

Published in 3.2.2

@MangelMaxime MangelMaxime deleted the formattable-string branch February 24, 2025 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support tagged template literals (e.g. for styled-components)
1 participant