Skip to content
This repository was archived by the owner on Mar 25, 2021. It is now read-only.
This repository was archived by the owner on Mar 25, 2021. It is now read-only.

Should not report an error on "null" when using in type position #1265

@yuit

Description

@yuit

We are trying to add linting to our library source files and run into issue below.

Bug Report (delete this for feature requests)

  • TSLint version: @next
  • TypeScript version: latest source-code built in master branch
  • Running TSLint via: Node.js API

TypeScript code being linted

match(regexp: string): RegExpMatchArray | null;

with tslint.json:

     ....
     "no-null-keyword": true,

Actual behavior

Get an error Use 'undefined' instead of 'null'

Expected behavior

There shouldn't be an error when using null in type position

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