-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Closed
Labels
DeclinedThe issue was declined as something which matches the TypeScript visionThe issue was declined as something which matches the TypeScript visionSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
TypeScript Version: 2.3.2
Code
import _ = require('lodash')
// with 'noImplicitAny' compiler option and without '@types/lodash' package dependencyDesired behavior:
The compiler emits no error.
Actual behavior:
The compiler emits this error:
Could not find a declaration file for module 'lodash'. '/project/node_modules/lodash/lodash.js' implicitly has an 'any' type.
Motivation:
- I want to use lodash (or any non-TS package) without types.
- I want to have
noImplicitAnyturned on for my own code. - I want to not depend on
@typespackages, which for many JS packages do not exist. (And unfortunately some of the ones that do exist are poorly maintained.) - I want to not add
.d.tsfiles for every non-typed third-party JS package I need to use. - I want to use TS's import-require (not var-require).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
DeclinedThe issue was declined as something which matches the TypeScript visionThe issue was declined as something which matches the TypeScript visionSuggestionAn idea for TypeScriptAn idea for TypeScript