Skip to content

Incorrect function definition of createAnswer and createOffer in lib.dom.d.ts #22353

@lgoenner

Description

@lgoenner

The current definitions of createAnswer and createOffer of RTCPeerConnection don't match the functions defined in the W3C specification.

createAnswer(successCallback?: RTCSessionDescriptionCallback, failureCallback?: RTCPeerConnectionErrorCallback): Promise<RTCSessionDescription>;
createOffer(successCallback?: RTCSessionDescriptionCallback, failureCallback?: RTCPeerConnectionErrorCallback, options?: RTCOfferOptions): Promise<RTCSessionDescription>;

W3C interface specification:

Promise<RTCSessionDescriptionInit> createOffer(optional RTCOfferOptions options);
Promise<RTCSessionDescriptionInit> createAnswer(optional RTCAnswerOptions options);

W3C legacy interface extensions:

Promise<void> createOffer(RTCSessionDescriptionCallback successCallback, RTCPeerConnectionErrorCallback failureCallback, optional RTCOfferOptions options);
Promise<void> createAnswer(RTCSessionDescriptionCallback successCallback, RTCPeerConnectionErrorCallback failureCallback);

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueHelp WantedYou can do this

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions