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)
- `null` prop with `satisfies`, `strictNullChecks: false` + `noImplicitAny: true` gives any report HOT 4
- Debugging failure caused by lack of backtick(`) HOT 4
- [proposal] Non widened string values should be valid enum values, like widened string values HOT 1
- 'Could not find source file' with Vue plugin when creating new files and using VS Code's file watcher HOT 7
- Contextual parameters inferred from overloads improvements
- Debug Failure caused by missing right parenthesis HOT 1
- Assignment not correctly inferred when checking string literal. Variable X is used before being assigned HOT 2
- Omit utility doesn't respect methods on a type HOT 1
- The type of inference is inaccurate HOT 3
- Design Meeting Notes, 7/12/2024 HOT 1
- Design Meeting Notes, 7/16/2024 HOT 2
- Design Meeting Notes, 7/19/2024
- Inline comments always stripped from .d.ts, including @ts-expect-error, @ts-ignore etc. HOT 4
- TS2590 for simple ternary expression with large discriminated union HOT 1
- Allow customization of type display format in hover tooltips HOT 4
- Debug Failure caused by Invalid syntax(null) HOT 1
- Debug failure caused by incorrect identifier and undefined type HOT 2
- TS2416 nonsensical fix suggestion (and possible false positive?) in a generic class implementing an interface verbatim HOT 3
- lib.es5.d.ts: Default ArrayConstructor generic parameter to `undefined` HOT 2
- Literal Tuples/'as const' - allow lib creator to mark type parameters as 'as const' to allow for better TS DSLs HOT 2
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.