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

Promise being recognized as Record #60935

Open
hyoretsu opened this issue Jan 8, 2025 · 1 comment
Open

Promise being recognized as Record #60935

hyoretsu opened this issue Jan 8, 2025 · 1 comment
Labels
Working as Intended The behavior described is the intended behavior; this is not a bug

Comments

@hyoretsu
Copy link

hyoretsu commented Jan 8, 2025

πŸ”Ž Search Terms

Record Promise

πŸ•— Version & Regression Information

^5.4.5

⏯ Playground Link

No response

πŸ’» Code

const a: Record<any, any> = new Promise(() => {})

πŸ™ Actual behavior

Promises are not the same as any other type, only when awaited properly.

πŸ™‚ Expected behavior

A type error should occur.

Additional information about the issue

No response

@RyanCavanaugh RyanCavanaugh added the Working as Intended The behavior described is the intended behavior; this is not a bug label Jan 8, 2025
@RyanCavanaugh
Copy link
Member

A Promise is a Record. It has properties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Working as Intended The behavior described is the intended behavior; this is not a bug
Projects
None yet
Development

No branches or pull requests

2 participants