Skip to content

Wrong or Misleading documentation about strictBuiltinIteratorReturn #3351

@ac10n

Description

@ac10n

In TSConfig - Strict - strictBuiltinIteratorReturn, the documentation says:

Built-in iterators are instantiated with a TReturn type of undefined instead of any.

Maybe it should be:

-Built-in iterators are instantiated with a `TReturn` type of undefined instead of `any`.
+Built-in iterators are instantiated with a `TReturn` type or undefined instead of `any`. 

or even:

-Built-in iterators are instantiated with a `TReturn` type of undefined instead of `any`.
+Built-in iterators are instantiated with a `TReturn | undefined` type instead of `any`. 

Also, an example can be useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions