Skip to content

Error when importing untyped JS modules #15031

Closed
@balajikris

Description

@balajikris

TypeScript Version: 2.2.1

Steps

  1. In a simple TS project in VSCode, add "adal-node": "^0.1.22", to package.json and run npm install. This is a JS library with no types.
  2. Import the library in your index.ts as below

Code

import adal from "adal-node";

Expected behavior:
Per this bug's resolution #3019 this code should compile with no errors

Actual behavior:
tsc.exe: 'Could not find a declaration file for module 'adal-node'. 'e:/proj/node_modules/adal-node/lib/adal.js' implicitly has an 'any' type.'

References:
see #3019 and all its linked bugs

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions