Skip to content

Add rule that mimics --noImplicitAny compiler option #432

@ajafff

Description

@ajafff

As discussed in microsoft/TypeScript#8855 there's a big demand to enable --noImplicitAny on a per-file basis. As this will not be supported by the compiler, this proposes duplicating that behavior as a lint rule.

IMO this rule should not be part of the recommended preset. If --noImplicitAny is already enabled the rule does nothing.

TODO:

  • there are some differences in type inference depending on --noImplicitAny -> find out which and if we need to warn in these cases too.
  • IIRC there was a PR to allow element access on a fresh object literal without index signature, but I can't find it right now.

Ref: palantir/tslint#4215

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions