-
Notifications
You must be signed in to change notification settings - Fork 30.6k
Description
If you know how to fix the issue, make a pull request instead.
- I tried using the
@types/xxxxpackage and had problems. - I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript
- I have a question that is inappropriate for StackOverflow. (Please ask any appropriate questions there).
- Mention the authors (see
Definitions by:inindex.d.ts) so they can respond.- Authors: @bczengel @chrootsu @stepancar @ericanderson @aj-r @Ailrun
I just did an update of my npm packages and started getting an error in my builds:
ERROR in [at-loader] ./node_modules/@types/lodash/index.d.ts:12651:53
Type 'T' does not satisfy the constraint 'object'.
This initially confused me, as I'm not including lodash in my project. After some digging, it appears that TypeDoc recently updated their type dependencies (TypeStrong/typedoc@afd6b60#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R36). I would put in an issue there, but this seems more to be an issue specific to the types.
What it's complaining about, specifically seems to be this:
//_.isWeakSet
interface LoDashStatic {
/**
* Checks if value is classified as a WeakSet object.
*
* @param value The value to check.
* @returns Returns true if value is correctly classified, else false.
*/
isWeakSet<T>(value?: any): value is WeakSet<T>;
}In particular, "isWeakSet(value?: any): value is WeakSet<T>;"
If I alter T to extend object, the error goes away, but wanted to make sure that's the appropriate fix.