[node.js] Missing score property on IPromptResult interface
Shouldn't the interface IPromptResult<T> (from botbuilder.d.ts) include the score: number; property?
Why would it have a score?
Well, I see that the IPromptResult<T> interface exported by the Prompts.ts file has such a property. Not sure whether that property is important from outside the framework but I'm extending the Prompts class to add some additional functionality and the compiler complains because the IPromptResult it sees from botbuilder.d.ts does not match the IPromptResult interface the Prompts class really uses. I've workarounded this by doing
declare module 'botbuilder' {
interface IPromptResult<T> extends IDialogResult<T> {
score: number;
}
}
Which is the best strategy to extend the Prompts class? Another problem is that the sendPrompt method, which is very useful when extending this class, has been declared as private, so it is not visible from child classes.
Oh I see... I forgot all about that. That was sort of a hack I needed to do to pass data back from the SimplePromptRecognizer. All of that code is eventually going to go away so I honestly wouldn't worry too much about it.
Can I ask what kind of functionality you're trying to add? The direction I'm moving in is to make prompts look and work more like the Custom Prompt example I recently published. If you're adding new prompts I'd suggest following that pattern instead,
Closing as it appears we've addressed the question and haven't heard back on other scenarios. Please at-mention us or file a new issue if you'd like to discuss further. Thanks!