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

Strange syntax in polyfill.d.ts - leading | when defining a union type #18172

Closed
OndrejSpanel opened this issue Dec 16, 2019 · 2 comments
Closed

Comments

@OndrejSpanel
Copy link
Contributor

OndrejSpanel commented Dec 16, 2019

I was surprised by the leading | in the

| Int8Array

export type TypedArray =
	| Int8Array
	| Uint8Array
...

I have checked Typescript grammar and it does not seem correct to me. I guess TS parsers somehow cope with this, but perhaps it would be safer to follow the specs?

@Mugen87
Copy link
Collaborator

Mugen87 commented Dec 16, 2019

Yeah, it's more clear to clean this up 👍 . Do you want to make a PR?

@OndrejSpanel
Copy link
Contributor Author

Sure.

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