Skip to content

lib.es6.d.ts declares console.debug()  #11751

Closed
@BurtHarris

Description

@BurtHarris

I'm not sure why lib.es6.d.ts defines method debug on interface Console. I don't find evidence that it's specified by the ECMA standard, or commonly implemented. It looks like console.debug may be a Microsoft (and Chrome)-specific extension, that functions the same as console.log per both MSDN and Chrome docs.. Compare this with Node console documentation.

TypeScript Version: 2.0.3

Code

console.debug("asdf");

Expected behavior:
Shouldn't this generate a TypeScript compiler error?

Actual behavior:
When building for ES6 target, seems to be accepted, but will generate a runtime error on Node.js.

Note
console.debug() is defined in the current WHATWG console document, but the definition there clearly indicates it is duplicative of console.log(),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions