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

Record name conflict with Typescript #370

Open
stafyniaksacha opened this issue Feb 3, 2023 · 1 comment
Open

Record name conflict with Typescript #370

stafyniaksacha opened this issue Feb 3, 2023 · 1 comment

Comments

@stafyniaksacha
Copy link

Since Typescript adoption is quite large, will not the Record name conflict with Record interface?

Knowing about the Type Annotations proposal, it may conflict too?

@acutmore
Copy link
Collaborator

acutmore commented Feb 3, 2023

Some information in #9 and #82 (comment)

The conflict is only conceptual rather than breaking. In TypeScript Record exists only as a global symbol in the 'type space', where as the Record constructor in this proposal is a global name in the JavaScript 'value space', so the TypeScript compiler can tell the difference between the two.

Example:

https://www.typescriptlang.org/play?&filetype=ts#code/LAKAJgpgxgNghgJwgAgOYwPYCM42Qb1GWOQBcBPABxSSgwTGQF4CBfAbmQHovlL4oEABYYYkBMgBm9MkJQByWvTDy+CAJYBbdaXUA3FBWpESMCKWQAlaMoBcBEyRIAKDPewAraKQCU9pQzsjk5SCBiaAKIAdqQaEADOzhD2AJKkEAhwWGYAPADaANYQ5PbxsepRqAA0yHq4AK7JyHBR5AC6AHx+yAFgQSBOHKCsoKMgdFFlPcxWNgwAdJJhkTFxiXltPv2gRoYz1nQMOWUalTUnFagd2yCgEAAelPQW+KxAA

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