runtimeContext type safety
Documentation claims:
Pass runtime configuration variables to tools through a type-safe runtimeContext.I may be missing something but I can't see how it is type safe. Type definition for
execute option of createTool is defined as RuntimeContext without any generics making it affectively to store everything as unknown.
Later in docs we have example:
Assertion unknown to a given type doesn't bring any type safety here. So I'd suggest to remove this misleading statement unless real type safe DI solution is introduced.1 Reply
📝 Created GitHub issue: https://github.com/mastra-ai/mastra/issues/8529
GitHub
[DISCORD:1424438995563053178] runtimeContext type safety · Issue #...
This issue was created from Discord post: https://discord.com/channels/1309558646228779139/1424438995563053178 Documentation claims: Pass runtime configuration variables to tools through a type-saf...