We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I'm manipulating the promise inside of the promiseHash, it breaks the typesafety and resolves my promise to unknown
promiseHash
unknown
Example code:
const { works, broken } = await promiseHash({ works: Promise.resolve(42), broken: Promise.resolve(42).then((x) => x), });
https://www.typescriptlang.org/play?#code/PQKgBAyglgtgDgGwKZiQDwIb2WEwBQ+AxgPYB2AzgC5gDeYA7iQE4DWFANGAEbMmtIyYAL5gAvGAwMMUGnD4woFJAAkMFABYAKWvgCQTNhQBcYAAoKlSAHTMkFEggBuSLQBYATAEoO+3v0FTCxJFZVt7Rxd3b2sqDUEtLTQvcQA+MGT8YS9CfFAwAFkWFHQsRHtcAnwAMwBXMiIqKHIwGAwBYNDXFN0wMDsqWuYhTqtwh2dXAG0ARi4PLgBmAF0c4VzSShpmKRnxVvakUeUtHOBgPr6APQB+Qk3qfqkPfbaOyxOvWPiyLQATDBUDBpMAAoFnC6XW73ciPHYMRavQ7HbrfBJg4FidIY6xtOBaWRIGAgwkwLwQy5gaGEc5gDTqDR7JRgapQMhIYiwmj0zR7CTyEJWNSaHRgMi1GDcJDMEwHd6Cz4iClQu55C48jQvZn+ARkTlbOkMl78j6qBmi8WS6Wyt5HU2nNG-DEgjEpbJqynU2kaxHavi6-WPH37AVdYXaeiWqUy0y2lEOuLowGY7HJ3EYfGkklUInkpUelUbLmMFisDB8ep-PlgUNC82RiXR2Xwvbu2mFwM0QxlitkP7Gmum8MWxvW0zwl5tyHXVUPLul8skSuIk0Ks0ihtWmNPBH59sz3L5AAygPsNFg5RggiBTRaWjsijQAFpak0EBQAAIAdmsM2sAAYUjwQh0DgFgaCoABPOAUBRcN9gAJSQUhmD+AAeahmDZABzLgUTQ+pWDIEgGDIVJUgAbnwUDwLAKCYLAABBaRCT+OCGTQ+D0BzPsKHMIcGXSCRekuKYAGkkEgsA2TAARIJIaowHDZZTGYmQc3Q8NxMk5ZKKyKiaOYGg-mQhByxQOoGlvIRa2UcNOIZVA0B4v4+PYzRUi0DVTHDLwglNNC1NY9yNAcjy9KAA
Go to playground & check hash2 and hash3 variable types.
hash2
hash3
I should be able to manipulate the promise with .then inside of the promiseHash object.
.then
No response
typescript 5.2.2 remix-utils 7.1.0
The text was updated successfully, but these errors were encountered:
It's likely that this is a limitation of TypeScript itself, I'll check if anyone reported anything similar to their issue tracker.
Sorry, something went wrong.
No branches or pull requests
Describe the bug
When I'm manipulating the promise inside of the
promiseHash
, it breaks the typesafety and resolves my promise tounknown
Example code:
Your Example Website or App
https://www.typescriptlang.org/play?#code/PQKgBAyglgtgDgGwKZiQDwIb2WEwBQ+AxgPYB2AzgC5gDeYA7iQE4DWFANGAEbMmtIyYAL5gAvGAwMMUGnD4woFJAAkMFABYAKWvgCQTNhQBcYAAoKlSAHTMkFEggBuSLQBYATAEoO+3v0FTCxJFZVt7Rxd3b2sqDUEtLTQvcQA+MGT8YS9CfFAwAFkWFHQsRHtcAnwAMwBXMiIqKHIwGAwBYNDXFN0wMDsqWuYhTqtwh2dXAG0ARi4PLgBmAF0c4VzSShpmKRnxVvakUeUtHOBgPr6APQB+Qk3qfqkPfbaOyxOvWPiyLQATDBUDBpMAAoFnC6XW73ciPHYMRavQ7HbrfBJg4FidIY6xtOBaWRIGAgwkwLwQy5gaGEc5gDTqDR7JRgapQMhIYiwmj0zR7CTyEJWNSaHRgMi1GDcJDMEwHd6Cz4iClQu55C48jQvZn+ARkTlbOkMl78j6qBmi8WS6Wyt5HU2nNG-DEgjEpbJqynU2kaxHavi6-WPH37AVdYXaeiWqUy0y2lEOuLowGY7HJ3EYfGkklUInkpUelUbLmMFisDB8ep-PlgUNC82RiXR2Xwvbu2mFwM0QxlitkP7Gmum8MWxvW0zwl5tyHXVUPLul8skSuIk0Ks0ihtWmNPBH59sz3L5AAygPsNFg5RggiBTRaWjsijQAFpak0EBQAAIAdmsM2sAAYUjwQh0DgFgaCoABPOAUBRcN9gAJSQUhmD+AAeahmDZABzLgUTQ+pWDIEgGDIVJUgAbnwUDwLAKCYLAABBaRCT+OCGTQ+D0BzPsKHMIcGXSCRekuKYAGkkEgsA2TAARIJIaowHDZZTGYmQc3Q8NxMk5ZKKyKiaOYGg-mQhByxQOoGlvIRa2UcNOIZVA0B4v4+PYzRUi0DVTHDLwglNNC1NY9yNAcjy9KAA
Steps to Reproduce the Bug or Issue
Go to playground & check
hash2
andhash3
variable types.Expected behavior
I should be able to manipulate the promise with
.then
inside of thepromiseHash
object.Screenshots or Videos
No response
Platform
typescript 5.2.2
remix-utils 7.1.0
Additional context
No response
The text was updated successfully, but these errors were encountered: