Skip to content

Conversation

@Gurimarukin
Copy link
Contributor

@Gurimarukin Gurimarukin commented Nov 23, 2023

  • If the transformation is not possible, $$text expands to "null", not undefined. Corrected doc accordingly.

  • You should be able to write this:
function $$textSafe(exp: unknown): string {
  const $res = $$text!(exp)

  if ($res === 'null') {
    return $$err!('$$text: exp in not transformable.')
  }

  return $res
}

But I get an error:
image
Updating, $$err return type to never fixes the problem.

@GoogleFeud
Copy link
Owner

Thanks for the PR! Will be merged soon

@snatvb
Copy link

snatvb commented Feb 9, 2025

Thanks for the PR! Will be merged soon

now feb 2025 and "soon" is the pr still opened
project is supporting or is it done?

no judge, just curious make sense to use it or not

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.

3 participants