Skip to content

Compile error with --strict-null-checks enabled. #3

Closed
@mhverbakel

Description

@mhverbakel

Strict null checking was added by microsoft/TypeScript#7140. This allows developers to make their code more type-safe by explicitly defining null or undefined as a type option.

This library gives me an compile error if strict null checking is enabled:

node_modules/await-semaphore/index.ts(12,13): error TS2532: Object is possibly 'undefined'.

Steps to reproduce

  1. Create a typescript 2.0 project with strict null checking enabled
  2. Add await-semaphore as a dependency
  3. Run tsc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions