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

Allow for generics with either or types #5

Closed
dereckmezquita opened this issue Jul 6, 2024 · 0 comments
Closed

Allow for generics with either or types #5

dereckmezquita opened this issue Jul 6, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@dereckmezquita
Copy link
Owner

Description

Much in the same way that TypeScript allows for Union Types, we can allow for Union Types in the interface package.

Implementation Ideas

CharNumList <- interface("list",
    value = c("character", "numeric")
)

# Implement the interface
list1 <- implement(CharNumList, list("John", 30))

Df <- interface("data.frame",
    name = "character",
    height = c("numeric", "character"),
    age = "numeric"
)
@dereckmezquita dereckmezquita added the enhancement New feature or request label Jul 6, 2024
@dereckmezquita dereckmezquita added this to the v0.1.0 milestone Jul 6, 2024
@dereckmezquita dereckmezquita self-assigned this Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant