Skip to content

Evaluate the iife produced by pa macro when used with p #3

Description

@devanshj
import { p, pa } from "@sthir/macro"

pa(x, p("!==", undefined))

Gets transformed to...

(t => t !== undefined)(x)

This is correct because pa could have even be used with some other predicate not just p...

pa(x, somePredicate)

But in cases where it's used with p the iife can be further evaluated....

x !== undefined

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions