microsoft / tsyringe

Lightweight dependency injection container for JavaScript/TypeScript
MIT License
5.19k stars 172 forks source link

refine value provider check if user passes a 'undefined' value #205

Open intellild opened 2 years ago

intellild commented 2 years ago

If user pass { useValue: undefined }, isProvider returns false, causing https://github.com/microsoft/tsyringe/blob/f738999f3058b223bdb81dada0164a358db2460e/src/dependency-container.ts#L91 treat the object as a class

risen228 commented 4 months ago

Fixed this in tsyringe-neo