Skip to content

Some missing types at directline.d.ts #255

Closed

Description

@bivas6

Hi,
I'm using directline in my app, and I noticed some missing types:

  1. This code:
  this._directLine = new DirectLine(options);
  this._directLine.activity$
    .subscribe((activity) => console.log(activity.replyToId))

Returns this error:

  Property 'replyToId' does not exist on type 'Message'.ts(2339)

But it is exist in the docs: https://docs.microsoft.com/en-us/dotnet/api/microsoft.bot.schema.activity.replytoid?view=botbuilder-dotnet-stable

  1. This code:
  this._directLine.postActivity({  type: 'endOfConversation', text: '...' , ...});

Returns this error:

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'

But it is exist in the docs: https://docs.microsoft.com/en-us/dotnet/api/microsoft.bot.schema.activitytypes.endofconversation?view=botbuilder-dotnet-stable

Thanks!

Activity

  1. added
    Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.
    customer-reportedRequired for internal Azure reporting. Do not delete.
    on Dec 19, 2019
  2. mdrichardson commented on Dec 19, 2019

    @mdrichardson

    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 package
    this._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.

  3. vishwacsena commented on Jan 2, 2020

    @vishwacsena

    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.

  4. cwhitten commented on Jan 15, 2020

    @cwhitten
    Member

    Hi Yaakov Bivas (@bivas6), we'll take an item in our upcoming milestone to update the types exposed.

  5. bivas6 commented on Jan 16, 2020

    @bivas6
    Author
  6. added
    R9Release 9 - May 15th, 2020
    and removed
    R8Release 8 - March 16th, 2020
    on Mar 4, 2020
  7. 11 remaining items

  8. added this to the R13 milestone on Feb 17, 2021
  9. carlosscastro commented on Mar 26, 2021

    @carlosscastro
    Member

    William Wong (@compulim) Chris Whitten (@cwhitten) is this on track to release in R13?

  10. removed this from the R13 milestone on Mar 26, 2021
  11. orgads commented on Dec 5, 2022

    @orgads
    Contributor

    ping?

  12. orgads commented on Aug 31, 2023

    @orgads
    Contributor

    This can be closed. type was changed to string.

  13. added a commit that references this issue on Jul 20, 2025
    5cce630
  14. orgads commented on Jul 20, 2025

    @orgads
    Contributor

    Sorry, the previous fix was only for 2. A fix for 1 is proposed in #441.

  15. added 5 commits that reference this issue on Feb 8, 2026
    1c1d037
    28ce228
    9e1f5e6
    a0aacd8
    ca2f71f
  16. added a commit that references this issue on Jun 19, 2026
    ac41e41
  17. added a commit that references this issue on Jun 22, 2026
    9bf8da3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.ExemptFromDailyDRIReportUse this label to exclude the issue from the DRI report.customer-replied-toRequired for internal reporting. Do not delete.customer-reportedRequired for internal Azure reporting. Do not delete.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions