Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

callable-types should handle new(): T just like (): T #4291

Closed
ghost opened this issue Nov 14, 2018 · 2 comments
Closed

callable-types should handle new(): T just like (): T #4291

ghost opened this issue Nov 14, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Nov 14, 2018

Bug Report

  • TSLint version: 5.11.0
  • TypeScript version: 3.2.0-dev.20181114
  • Running TSLint via: CLI

TypeScript code being linted

interface I0 { (): void; }
interface I1 { new (): void; }

with tslint.json configuration:

{ "extends": "tslint:latest" }

Actual behavior

Lint failure at I0 but not at I1.

Expected behavior

Lint failure at both, since this can be changed to:

type I0 = () => void;
type I1 = new () => void;
@JoshuaKGoldberg
Copy link
Contributor

Agreed, thanks for reporting this @andy-ms! I'd be happy to express merge a PR for this.

@JoshuaKGoldberg
Copy link
Contributor

Fixed by #4352! ✨

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant