-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Closed
Copy link
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Error MessagesThe issue relates to error messagingThe issue relates to error messagingFixedA PR has been merged for this issueA PR has been merged for this issueGood First IssueWell scoped, documented and has the green lightWell scoped, documented and has the green lightHelp WantedYou can do thisYou can do this
Milestone
Description
TypeScript Version: 2.7.0-dev.201xxxxx
Code
import discord_js_original_js = require("./node_modules/discord.js/src/index.js");
Expected behavior:
Ideally no error if the file is loaded, or
index.ts(3,41): error TS7016: Could not find a declaration file for module './node_modules/discord.js/src/index.js'. 'E:/Github/TypeScript/tests/cases/user/discord.js/node_modules/discord.js/src/index.js' implicitly has an 'any' type.
If it's not found.
Actual behavior:
The above, plus:
Try `npm install @types/./node_modules/discord.js/src/index.js` if it exists or add a new declaration (.d.ts) file containing `declare module './node_modules/discord.js/src/index.js';`
Both npm install @types/./node_modules/discord.js/src/index.js
and declare module './node_modules/discord.js/src/index.js';
are nonfunctional nonsense and aught not to be suggested.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Error MessagesThe issue relates to error messagingThe issue relates to error messagingFixedA PR has been merged for this issueA PR has been merged for this issueGood First IssueWell scoped, documented and has the green lightWell scoped, documented and has the green lightHelp WantedYou can do thisYou can do this