-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
TypeScript unexpectedly inferring 'any' type. #30250
Comments
Tagging @DanielRosenwasser |
@RyanCavanaugh do you have any ideas here? Thanks! |
This problem was fixed by #29740 |
@RyanCavanaugh Thanks! Is there a way to tell what release of TS that may have made it out into? |
The PR was 3 days ago, so it'd be in any nightly starting approximately yesterday |
@RyanCavanaugh wasn't it almost a month ago? This is part of github that i'm not really familiar with! |
I thought today was February 7th 🤦♂️ This fix wasn't in 3.3, so "nightly" is still the right answer. The incantation (if you have a local TS repo) to check is D:\github\TypeScript>git branch -r --contains d9ee867
origin/HEAD -> origin/master
origin/master
origin/no-mkdir-race
upstream/add-globalThis
upstream/applyChangesToOpenFiles
upstream/circularConstraintErrors
upstream/contextualGenericRestParameter
upstream/convert-to-named-parameters
upstream/incrementalBuildInfo
upstream/master
upstream/perfTimeStamp
upstream/revertExecFileSync
upstream/usePrependToSkipBuild
upstream/weswigham-patch-1 |
That's ok. I still think it's 2017 occasionally. :D |
Thanks. Have confirmed this is fixed in the latest nightly. I'm going to keep this issue open though until that is released. @RyanCavanaugh @DanielRosenwasser Any general idea of when 3.4 might be released? Trying to make plans depending on if it's more like in a week or so, or more like a month. Thanks much! |
This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
See #30281 |
Given the following code:
TypeScript oddly infers a type of
[any, string]
foro
. This is surprising to us given how we would think these type operators would work. First, given the definitionUnwrappedObject
i would expectUnwrappedObject<TupleType>
to expand like so:HOwever, instead of getting
{ x: number }
(which is just the Widget type), we end up with 'any'. Cany anyone shed any light on this? Thanks!The text was updated successfully, but these errors were encountered: