-
Notifications
You must be signed in to change notification settings - Fork 12
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
feat: Provide typed model parameters in LLM Module Config #424
Conversation
/** | ||
* Model parameters should accept known typed parameters and arbitrary parameters. | ||
*/ | ||
expectType<LlmModelParams>({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently this is not allowed. The TS compiler performs the excess property check before & Record<string, any>
is read so it considers this type to be "too wide"? Would like some suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the problem is not that it doesnt read Record<string, any> but rather that tsd expectType does strict type assertions -> https://github.com/tsdjs/tsd?tab=readme-ov-file#strict-type-assertions.
As suggested used expectAssignable
instead
Context
SAP/ai-sdk-js-backlog#83.