You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Type '"endOfConversation"' is not assignable to type '"message" | "event" | "typing"'.ts(2322)
directLine.d.ts(271, 5): The expected type comes from property 'type' which is declared here on type 'Activity'
Yaakov Bivas (@bivas6)botframework-directlinejs doesn't implement the full schema as the rest of DirectLine. You can see what is included here.
As a workaround, you can suppress the error and still send your activity with any type or replyToId; once the typescript code is converted to javascript, there isn't any type checking that goes on, so you can still send the activity with the "normal" schema
Something like this:
//@ts-ignore: Activity Schema is valid for DirectLine, but not the botframework-directline packagethis._directLine.postActivity({type: 'endOfConversation'})
William Wong (@compulim) Is there a reason this doesn't include all DL schema? If you like, I can submit a PR that covers this.
DirectLineJS is a browser client on DirectLine and will not support the full DirectLine schema. That said, we will evaluate the interface we expose to see if we should add or remove any existing types and will report back.
Activity
mdrichardson commentedon Dec 19, 2019
Yaakov Bivas (@bivas6)
botframework-directlinejsdoesn't implement the full schema as the rest of DirectLine. You can see what is included here.As a workaround, you can suppress the error and still send your activity with any type or
replyToId; once the typescript code is converted to javascript, there isn't any type checking that goes on, so you can still send the activity with the "normal" schemaSomething like this:
William Wong (@compulim) Is there a reason this doesn't include all DL schema? If you like, I can submit a PR that covers this.
vishwacsena commentedon Jan 2, 2020
DirectLineJS is a browser client on DirectLine and will not support the full DirectLine schema. That said, we will evaluate the interface we expose to see if we should add or remove any existing types and will report back.
cwhitten commentedon Jan 15, 2020
Hi Yaakov Bivas (@bivas6), we'll take an item in our upcoming milestone to update the types exposed.
bivas6 commentedon Jan 16, 2020
Thanks Chris Whitten (@cwhitten)
11 remaining items
carlosscastro commentedon Mar 26, 2021
William Wong (@compulim) Chris Whitten (@cwhitten) is this on track to release in R13?
orgads commentedon Dec 5, 2022
ping?
orgads commentedon Aug 31, 2023
This can be closed.
typewas changed to string.Add replyToId to IActivity type
orgads commentedon Jul 20, 2025
Sorry, the previous fix was only for 2. A fix for 1 is proposed in #441.
Add replyToId to IActivity type
Add replyToId to IActivity type
Add replyToId to IActivity type
Add replyToId to IActivity type
Add replyToId to IActivity type
Add replyToId to IActivity type
Add replyToId to IActivity type (#441)