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

Creating type that yields type A if indexed with integer, and type B if indexed with string #722

Open
Frityet opened this issue Nov 15, 2023 · 0 comments
Labels
feature request New feature or request

Comments

@Frityet
Copy link

Frityet commented Nov 15, 2023

Something like

type MyType = { integer: A, string: B }
local my_tbl: MyType = {
    [1] = make_a(),
    key = make_b()
}

It would be really nice and useful

@hishamhm hishamhm added the feature request New feature or request label Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants