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

Add support for single quotes #46

Open
Yash-Singh1 opened this issue May 30, 2021 · 1 comment
Open

Add support for single quotes #46

Yash-Singh1 opened this issue May 30, 2021 · 1 comment

Comments

@Yash-Singh1
Copy link

Strings currently can't be wrapped in single quotes, they have to be wrapped in double-quotes:

type function TrimLeft = (T) => ^{
    if (T extends `${infer space}${infer rest}`) {
        return ^{
            if (space extends ' ' /* error */) {
                return TrimLeft<rest>
            } else {
                return rest
            }
        }
    } else {
        return never
    }
}
@mistlog
Copy link
Owner

mistlog commented Jun 6, 2021

Yes, we only support double-quotes for consistent code style.

For example, in javascript, we can use both '' and "", then one day we will find that we need code formatter such as prettier to enforce one way to use quote, such as --single-quote option.

I guess that if we support only one way to do things like this, we don't need formatter for this purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants