Skip to content

setLocalDescription requires the description argument when it should not. #41939

Description

@jcc10

TypeScript Version: 4.2.0-dev.20201211

Search Terms: setLocalDescription, LocalDescription

Code

export async function test() {
    const pc = new RTCPeerConnection();
    await pc.setLocalDescription();
}

Expected behavior:
No Errors.

Actual behavior:

npx tsc test.ts
test.ts:3:14 - error TS2554: Expected 1 arguments, but got 0.

3     await pc.setLocalDescription();
               ~~~~~~~~~~~~~~~~~~~~~

  ../emsdk/node/12.18.1_64bit/lib/node_modules/typescript/lib/lib.dom.d.ts:12238:25
    12238     setLocalDescription(description: RTCSessionDescriptionInit): Promise<void>;
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    An argument for 'description' was not provided.


Found 1 error.
**

Playground Link: https://www.typescriptlang.org/play?#code/KYDwDg9gTgLgBAQwO4IJbwGYFcB2BjGVCHOGYAZxgAoBKOAbwCg4W49jK4w84BeOHMCRwASgBUAwgAVgwKBOKCCRHLQDczVsjTxuAOnLAYAGQh4EAGwAiFPFFRhCxdYwC+QA

Related Issues: No.

Spec: https://w3c.github.io/webrtc-pc/#dom-peerconnection-setlocaldescription (Paragraph 3)

I already have a fork that has the lib patched I am unsure if there is any other code that would have to be patched.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions