Skip to content

In JS, importing JSON should not give an error #23712

Closed

Description

We don't have to give a good type, but there should not be an error.

Search terms: import require json

const version = require('./package.json').version

Expected behavior:
No error and maybe even version: string

Actual behavior:
Error and version: any.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions