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

Type name with $ is invalid in F# #383

Open
Booksbaum opened this issue Mar 7, 2021 · 0 comments
Open

Type name with $ is invalid in F# #383

Booksbaum opened this issue Mar 7, 2021 · 0 comments

Comments

@Booksbaum
Copy link
Contributor

There are several characters that aren't valid in F# type names (or module, namespace, union type case): .+$&[]/\*"'` . These are invalid even inside double-backticks. (BUT: are valid in other identifiers like variable name)

In TypeScript $ is allowed:

(simplified from @types/jest)

interface $JestEnvironment {
}

type Environment = $JestEnvironment;

=>

type [<AllowNullLiteral>] ``$JestEnvironment`` =
    interface end

type Environment =
    ``$JestEnvironment``

error FS0883: Invalid namespace, module, type or union case name

-> $ (and probably other invalid chars) should be removed in type names & co

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

1 participant