Comments (4)
I think for this to work TS would need to infer type arguments from indexed access types, but it doesn't. This isn't considered a bug but a missing feature, which is possibly implemented at #20126 and/or #53017, neither of which have been merged.
from typescript.
Looking forward the feature
from typescript.
The feature needed here is the more complex "Given a set of parameter types, produce what an equivalent call expression would have done". ReturnType<F>
is definitely not that.
from typescript.
This issue has been marked as "Duplicate" and has seen no recent activity. It has been automatically closed for house-keeping purposes.
from typescript.
Related Issues (20)
- wrong behavior about type parameters of `as` clause in a mapped type HOT 2
- Type is not referred correctly in the while loop HOT 4
- Interface type coercion fails with unsatisfied properties in unions HOT 1
- Generic type narrowing for truthy check has inconsistent / incorrect behavior HOT 1
- `rootDirs` is not working as expected. HOT 9
- Function inference is incorrect with inline const objects HOT 1
- No typechecking error in code that uses an uninitialized variable due to circular reference HOT 1
- Readonly shorthand cast for expression where `as const` is forbidden
- Optimal TS monorepos: how to handle project references when projects opt out of composite within dependency chain HOT 2
- Auto accessor field types cannot be inferred from constructor
- The order of values ββin a union affects the correct type inference HOT 1
- Inlay variance hints
- false ? ... behavior is weird. HOT 1
- Google feedback on TS 5.6-beta HOT 5
- TypeScript auto-import does not suggest tsconfig paths containing `${configDir}`
- Two mapped types on same type can't be both indexed by the same key HOT 3
- `instantiateMappedTupleType` should not use array index as mapping key, at least it's not in an appropriate way
- Boolean narrowed to true only when generic type is explicitly provided while it shouldn't HOT 6
- Can't understand error -> Operator '+' cannot be applied to types 'BigInt' and 'BigInt' HOT 3
- OS getting unresponsive when JSDoc importing `"/dev/random"`, forcing manual restart
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typescript.