Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

unified-signatures suggests combining declarations that shouldn't be #183

Open
zbjornson opened this issue Jan 21, 2019 · 1 comment
Open

Comments

@zbjornson
Copy link

class MyClass {
  method1(mimeType: 'image/png', config?: PngConfig): void
  method1(mimeType: 'image/jpeg', config?: JpegConfig): void

  /** call with a number */
  method2(p1: number): void
  /** call with a string */
  method2(p1: string): void
}

dtslint suggests combining both of those pairs of declarations, but I think that is incorrect. method1 shouldn't be combined because the type of the 2nd arg depends on the value of the 1st arg. method2 shouldn't be combined because their doc strings are different.

@ndunks
Copy link

ndunks commented Aug 8, 2019

There's no explanation how to face this? I also have same experience..

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants