{"action":"closed","issue":{"url":"https://api.github.com/repos/ivogabe/gulp-typescript/issues/213","labels_url":"https://api.github.com/repos/ivogabe/gulp-typescript/issues/213/labels{/name}","comments_url":"https://api.github.com/repos/ivogabe/gulp-typescript/issues/213/comments","events_url":"https://api.github.com/repos/ivogabe/gulp-typescript/issues/213/events","html_url":"https://github.com/ivogabe/gulp-typescript/issues/213","id":109400934,"number":213,"title":"Filter not working","user":{"login":"n2westman","id":1989023,"avatar_url":"https://avatars.githubusercontent.com/u/1989023?v=3","gravatar_id":"","url":"https://api.github.com/users/n2westman","html_url":"https://github.com/n2westman","followers_url":"https://api.github.com/users/n2westman/followers","following_url":"https://api.github.com/users/n2westman/following{/other_user}","gists_url":"https://api.github.com/users/n2westman/gists{/gist_id}","starred_url":"https://api.github.com/users/n2westman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n2westman/subscriptions","organizations_url":"https://api.github.com/users/n2westman/orgs","repos_url":"https://api.github.com/users/n2westman/repos","events_url":"https://api.github.com/users/n2westman/events{/privacy}","received_events_url":"https://api.github.com/users/n2westman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ivogabe/gulp-typescript/labels/Bug","name":"Bug","color":"e11d21"},{"url":"https://api.github.com/repos/ivogabe/gulp-typescript/labels/Docs","name":"Docs","color":"207de5"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-01T23:00:30Z","updated_at":"2015-10-02T07:33:40Z","closed_at":"2015-10-02T07:33:40Z","body":"```\r\ngulp.task('typescript', function () {\r\n\tvar tsStream = gulp.src(sourceFiles)\r\n\t\t.pipe(ts(tsProject, {referencedFrom: [outFiles[0]]}))\r\n\t\t.js\r\n\t\t.pipe(concat(outFiles[0].replace(/\\.ts$/,'.js')));\r\n\r\n\treturn tsStream.pipe(gulp.dest('.'));\r\n});\r\n```\r\nworks, while\r\n\r\n```\r\ngulp.task('typescript', function () {\r\n\tvar tsStream = gulp.src(sourceFiles)\r\n\t\t.pipe(ts(tsProject))\r\n\t\t.pipe(ts.filter({referencedFrom: [outFiles[0]]}))\r\n\t\t.pipe(concat(outFiles[0].replace(/\\.ts$/,'.js')));\r\n\r\n\treturn tsStream.pipe(gulp.dest('.'));\r\n});\r\n```\r\nDoes not.\r\n\r\nError below.\r\n\r\n```\r\n        if (filters.referencedFrom !== undefined) {\r\n                   ^\r\nTypeError: Cannot read property 'referencedFrom' of undefined\r\n    at new Filter (/Users/nickwestman/Documents/ReachClient/Web/node_modules/gulp-typescript/release/filter.js:10:20)\r\n    at DestroyableTransform._transform (/Users/nickwestman/Documents/ReachClient/Web/node_modules/gulp-typescript/release/main.js:236:29)\r\n    at DestroyableTransform.Transform._read (/Users/nickwestman/Documents/ReachClient/Web/node_modules/readable-stream/lib/_stream_transform.js:172:10)\r\n    at DestroyableTransform.Transform._write (/Users/nickwestman/Documents/ReachClient/Web/node_modules/readable-stream/lib/_stream_transform.js:160:12)\r\n    at doWrite (/Users/nickwestman/Documents/ReachClient/Web/node_modules/readable-stream/lib/_stream_writable.js:326:12)\r\n    at writeOrBuffer (/Users/nickwestman/Documents/ReachClient/Web/node_modules/readable-stream/lib/_stream_writable.js:312:5)\r\n    at DestroyableTransform.Writable.write (/Users/nickwestman/Documents/ReachClient/Web/node_modules/readable-stream/lib/_stream_writable.js:239:11)\r\n    at CompileStream.ondata (_stream_readable.js:540:20)\r\n    at CompileStream.emit (events.js:107:17)\r\n    at readableAddChunk (_stream_readable.js:163:16)\r\n```"}}