```ts import * as _ from 'underscore'; declare let xs: Foo[]; const x = _.sample(xs); ``` The type of `x` should be `Foo`, but it's `{}`. cc @pandananta - [x] I tried using the `@types/underscore` package and had problems. - [x] I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript - [x] I have a question that is inappropriate for [StackOverflow](https://stackoverflow.com/). (Please ask any appropriate questions there). - [x] [Mention](https://github.com/blog/821-mention-somebody-they-re-notified) the authors (see `Definitions by:` in `index.d.ts`) so they can respond. - Authors: @borisyankov, @jbaldwin, @ccurrens
The type of
xshould beFoo, but it's{}. cc @pandananta@types/underscorepackage and had problems.Definitions by:inindex.d.ts) so they can respond.