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

New literals() function converting union literal types to values #575

Closed
samchon opened this issue Apr 7, 2023 · 0 comments
Closed

New literals() function converting union literal types to values #575

samchon opened this issue Apr 7, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@samchon
Copy link
Owner

samchon commented Apr 7, 2023

export function literals<T extends Atomic.Type>(): T[];

literals<"A" | 2 | false>(); // ["A", 2, false] as const
@samchon samchon added the enhancement New feature or request label Apr 7, 2023
@samchon samchon self-assigned this Apr 7, 2023
@samchon samchon closed this as completed in 0d60af4 Apr 7, 2023
samchon added a commit that referenced this issue Apr 7, 2023
Close #575 - new function `literals()`
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