Skip to content

Instantly share code, notes, and snippets.

@minajevs
Created October 15, 2018 08:58
Show Gist options
  • Save minajevs/806bd1dbd8d4eb171f2c7b64dd526a8a to your computer and use it in GitHub Desktop.
Save minajevs/806bd1dbd8d4eb171f2c7b64dd526a8a to your computer and use it in GitHub Desktop.
class A {
constructor(); // Error: overload signature not compatible with impl
constructor(a: number | undefined) {}
}
class A {
constructor();
constructor(a?: number) {} // this one works
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment