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

Suggestion: Support for native functions #170

Open
Ceedrich opened this issue Feb 9, 2024 · 1 comment
Open

Suggestion: Support for native functions #170

Ceedrich opened this issue Feb 9, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Ceedrich
Copy link

Ceedrich commented Feb 9, 2024

Suggestion: Support for native functions

I love, how your library enhances the typescript experience when working with literal types. However, it is kind of exhausting to always use the library's functions instead of the native javascript ones.
Would you consider (maybe as an option) mapping the string-ts types onto the native javascript functions (see example below)?


Example:

Before:

import { join } form "string-ts"

const joinedString = join(["some", "literal", "string"], " ")
//    ^? "some literal array"

After:

const joinedString = ["some", "literal", "string"].join(" ")
//    ^? "some literal array"

I am looking forward to your evaluation

@gustavoguichard
Copy link
Owner

Hey @Ceedrich , thanks for contributing. Sorry for the late reply I somehow lost your notification in my inbox.

Even though it is not in our roadmap and I think it could be too much to add it onto the native functions I'm open to the idea and would love to hear some suggestion about it.

@gustavoguichard gustavoguichard added the enhancement New feature or request label Apr 30, 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

2 participants