{"action":"created","issue":{"url":"https://api.github.com/repos/ivogabe/gulp-typescript/issues/263","labels_url":"https://api.github.com/repos/ivogabe/gulp-typescript/issues/263/labels{/name}","comments_url":"https://api.github.com/repos/ivogabe/gulp-typescript/issues/263/comments","events_url":"https://api.github.com/repos/ivogabe/gulp-typescript/issues/263/events","html_url":"https://github.com/ivogabe/gulp-typescript/issues/263","id":126318348,"number":263,"title":"Compilation not completed at task completion","user":{"login":"staff0rd","id":6289998,"avatar_url":"https://avatars.githubusercontent.com/u/6289998?v=3","gravatar_id":"","url":"https://api.github.com/users/staff0rd","html_url":"https://github.com/staff0rd","followers_url":"https://api.github.com/users/staff0rd/followers","following_url":"https://api.github.com/users/staff0rd/following{/other_user}","gists_url":"https://api.github.com/users/staff0rd/gists{/gist_id}","starred_url":"https://api.github.com/users/staff0rd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/staff0rd/subscriptions","organizations_url":"https://api.github.com/users/staff0rd/orgs","repos_url":"https://api.github.com/users/staff0rd/repos","events_url":"https://api.github.com/users/staff0rd/events{/privacy}","received_events_url":"https://api.github.com/users/staff0rd/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ivogabe/gulp-typescript/labels/Question","name":"Question","color":"5319e7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-13T01:25:12Z","updated_at":"2016-01-14T14:24:46Z","closed_at":"2016-01-14T14:24:46Z","body":"Am I incorrectly expecting typescript compilation to be completed on task completion?  For example, I have the following in [gulpfile.js](https://github.com/staff0rd/gulp-typescript-test/blob/master/gulpfile.js);\r\n\r\n~~~javascript\r\ngulp.task('watch', ['compile'], function () {\r\n  gulp.watch('./src/**/*.ts', ['compile']);\r\n  gulp.watch('./src/compiled.js', ['reload']);\r\n});\r\n\r\ngulp.task('compile', function(){\r\n   gulp.src('./src/**/*.ts')\r\n     .pipe(typescript({out: 'compiled.js'}))\r\n     .pipe(gulp.dest('./src'))\r\n});\r\n~~~\r\n\r\nWhich in my (admittedly beginner) understanding means `compile` will be completed prior to `watch`, therefore on gulp startup if I call `watch`, `reload` is not immediately triggered.\r\n\r\nHowever, I am finding that `reload` is being triggered.  Should `typescript()` not be completed by the time the second `watch` is applied to trigger `reload`, and as such, `reload` not be called?\r\n\r\n~~~\r\nc:\\git\\gulp-typescript-test>gulp\r\n[12:17:12] Using gulpfile c:\\git\\gulp-typescript-test\\gulpfile.js\r\n[12:17:12] Starting 'connect'...\r\n[12:17:12] Finished 'connect' after 31 ms\r\n[12:17:12] Starting 'compile'...\r\n[12:17:12] Finished 'compile' after 9.63 ms\r\n[12:17:12] Starting 'watch'...\r\n[12:17:12] Finished 'watch' after 14 ms\r\n[12:17:12] Starting 'default'...\r\n[12:17:12] Finished 'default' after 4.46 μs\r\n[12:17:12] Server started http://localhost:9000\r\n[12:17:12] LiveReload started on port 35729\r\n[12:17:13] Starting 'reload'...\r\n[12:17:13] Finished 'reload' after 14 ms\r\n~~~\r\n\r\n[Repro here](https://github.com/staff0rd/gulp-typescript-test)."},"comment":{"url":"https://api.github.com/repos/ivogabe/gulp-typescript/issues/comments/171656619","html_url":"https://github.com/ivogabe/gulp-typescript/issues/263#issuecomment-171656619","issue_url":"https://api.github.com/repos/ivogabe/gulp-typescript/issues/263","id":171656619,"user":{"login":"staff0rd","id":6289998,"avatar_url":"https://avatars.githubusercontent.com/u/6289998?v=3","gravatar_id":"","url":"https://api.github.com/users/staff0rd","html_url":"https://github.com/staff0rd","followers_url":"https://api.github.com/users/staff0rd/followers","following_url":"https://api.github.com/users/staff0rd/following{/other_user}","gists_url":"https://api.github.com/users/staff0rd/gists{/gist_id}","starred_url":"https://api.github.com/users/staff0rd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/staff0rd/subscriptions","organizations_url":"https://api.github.com/users/staff0rd/orgs","repos_url":"https://api.github.com/users/staff0rd/repos","events_url":"https://api.github.com/users/staff0rd/events{/privacy}","received_events_url":"https://api.github.com/users/staff0rd/received_events","type":"User","site_admin":false},"created_at":"2016-01-14T14:24:46Z","updated_at":"2016-01-14T14:24:46Z","body":"This of course worked as expected, thanks so much."}}