-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed as not planned
Labels
You Can Do ThisA ticket which has been greenlighted as will be acceptedA ticket which has been greenlighted as will be acceptedbugdocumentationChanges only affect the documentationChanges only affect the documentation
Description
On the handbook page on Mixins (https://www.typescriptlang.org/docs/handbook/mixins.html) you have the following typescript code as an example:
type Constructor = new (...args: any[]) => {};According to Default-Rules of eslint, this is an ERROR: Don't use {} as a type. {} actually means "any non-nullish value". In my view, eslint is right - the mixin will return an object and never something like a number.
(https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/ban-types.md)
It should probably be rewritten like this:
type Constructor = new (...args: any[]) => Record<string,any>; MFG (kind regards)
Metadata
Metadata
Assignees
Labels
You Can Do ThisA ticket which has been greenlighted as will be acceptedA ticket which has been greenlighted as will be acceptedbugdocumentationChanges only affect the documentationChanges only affect the documentation