Skip to content

Users shouldn't need 'noImplicitThis' on to benefit from 'ThisType<T>' #14518

Closed
@DanielRosenwasser

Description

@DanielRosenwasser

From #14141:

  • Otherwise, if --noImplicitThis is enabled and the containing object literal has a contextual type that includes a ThisType<T>, this has type T.

Is there a reason that users need noImplicitThis on to benefit from ThisType<T>? This seems unnecessarily restrictive, especially given that we want to give better support in JS files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DeclinedThe issue was declined as something which matches the TypeScript visionSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions