Skip to content

[Feature] Add nullable reference annotations. #473

@Jason5Lee

Description

@Jason5Lee

The playwright library has no clear documentation about whether an argument or return type can be null. In the original TypeScript library it's not a problem since the type system of TypeScript supports nullable annotation. For example, the page.contentText has a string | null type, which indicates that it may be null. With strictNullCheck compiler option, you can't call its methods without proper null check.

image

However, in this project, the nullable annotation is absent, neither the documentation points out the fact that it can be null.

image

Java actually has a plenty of null annotations. These annotations can also be identify in Kotlin. I hope nullable can be properly annotated like the TypeScript library, or at least be documented.

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