Skip to content

False-positive void-return in dtslint after adding awaited #37551

Closed
@Maxim-Mazurok

Description

@Maxim-Mazurok

TypeScript Version: from 3.9.0-dev.20200321 to 3.9.0-dev.20200324

Code

declare namespace gapi.client {
    function load(name: "abusiveexperiencereport", version: "v1"): PromiseLike<void>;
    function load(name: "abusiveexperiencereport", version: "v1", callback: () => any): void;
}

Expected behavior:
dtslint uses rule void-return which didn't fail for the above code and shouldn't fail.

Actual behavior:
When dtslint is paired with typescript version since this commit: e3ec7b1 which was merged in #35998 - it fails:

ERROR: 17:80  void-return  Use the `void` type for return types only. Otherwise, use `undefined`. See: https://github.com/Microsoft/dtslint/blob/master/docs/void-return.md
ERROR: 18:89  void-return  Use the `void` type for return types only. Otherwise, use `undefined`. See: https://github.com/Microsoft/dtslint/blob/master/docs/void-return.md

Related to Maxim-Mazurok/google-api-typings-generator#101

Metadata

Metadata

Assignees

No one assigned

    Labels

    ExternalRelates to another program, environment, or user action which we cannot control.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions