ExtenderType, ExtenderTypeOptional do not satisfy the constraint
See original GitHub issueDescribe the bug 🐛
I think 34759d2eb3d96602be372537b0e0392e1d03ae7d introduced a bug to TS definitions.
(type parameter) T in type ExtenderType<T>
Type 'T[P]' does not satisfy the constraint '(...args: any) => any'.
Type 'T[keyof T]' is not assignable to type '(...args: any) => any'.
Type 'T[string] | T[number] | T[symbol]' is not assignable to type '(...args: any) => any'.
Type 'T[string]' is not assignable to type '(...args: any) => any'.ts(2344)
To Reproduce 📝
Build failure:
https://github.com/ScaleLeap/config/pull/44/checks?check_run_id=602773264
But also just inspecting the env-var.d.ts
will display the errors in VS Code.
Expected behaviour 🤷♂️🤷
No errors.
Screenshots 📷

Environment (please complete the following information) 💻:
- OS: macOS
- Runtime: VS Code, CLI
- Version:
❯ tsc -v
Version 3.8.3
❯ node -v
v12.16.0
Additional context
N/A
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Type does not satisfy the constraint and incorrectly extends ...
I'm trying to implement a generic Specification pattern and a generic Visitor pattern together. Here are my base interfaces ...
Read more >[NewErrors] 4.8.0-dev.20220609 vs 4.7.3 #49461 - GitHub
error TS2344: Type 'K' does not satisfy the constraint ... 's second type argument is constrained: K extends Record<string, any> = {} ....
Read more >Constraints on type parameters - C# Programming Guide
If client code uses a type that doesn't satisfy a constraint, the compiler issues an error. Constraints are specified by using the where ......
Read more >TypeScript - Sequelize
Sequelize Models accept two generic types to define what the model's Attributes & Creation Attributes are like: import { Model, Optional } from ......
Read more >Useful Patterns by Use Case - React TypeScript Cheatsheets
Type '"foo"' is not assignable to type '"button" | "submit" | "reset" | undefined'.(2322) ... export interface ButtonProps extends React.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@moltar can you test the 6.x branch with your application? I believe it resolves the issue.
Likewise, thank you for the report.
I’ll need to look into the testing, since I want these things to be caught by CI! It seems like I need a separate project or something to fully test, since the sample I use in this repo clearly isn’t doing the trick.