Skip to content
This repository was archived by the owner on Feb 18, 2022. It is now read-only.
This repository was archived by the owner on Feb 18, 2022. It is now read-only.

Compare types of exports #23

@gabritto

Description

@gabritto

We should compare the types of what is exported in the declaration file against the inferred types of what is exported in the JS source. This most likely should be used to provide warnings/suggestions, because JS type inference might not be good enough for this to be used as a lint rule. The implementation should also be resilient enough to avoid emitting useless information when inference of JS types doesn't work well.
Example:
js

module.exports.str = "clearly a string"; // Inferred type: "string"

d.ts

export const str: number; // Wrong type

In this case we'd want a warning that the type of str could be wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions