Title: TypeError: Cannot read property 'length' of undefined at Object.forEachChild · Issue #18301 · microsoft/TypeScript · GitHub
Open Graph Title: TypeError: Cannot read property 'length' of undefined at Object.forEachChild · Issue #18301 · microsoft/TypeScript
X Title: TypeError: Cannot read property 'length' of undefined at Object.forEachChild · Issue #18301 · microsoft/TypeScript
Description: TypeScript Version: 2.5.2 and 2.6.0-dev.20170906 (can reproduce on both versions) Code /** * @typedef LoadCallback * @type {function} */ type LoadCallback = void; Expected behavior: Code compiles successfully. Actual behavior: Compiler c...
Open Graph Description: TypeScript Version: 2.5.2 and 2.6.0-dev.20170906 (can reproduce on both versions) Code /** * @typedef LoadCallback * @type {function} */ type LoadCallback = void; Expected behavior: Code compiles s...
X Description: TypeScript Version: 2.5.2 and 2.6.0-dev.20170906 (can reproduce on both versions) Code /** * @typedef LoadCallback * @type {function} */ type LoadCallback = void; Expected behavior: Code compiles s...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/18301
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"TypeError: Cannot read property 'length' of undefined at Object.forEachChild","articleBody":"**TypeScript Version:** 2.5.2 and 2.6.0-dev.20170906 (can reproduce on both versions)\r\n\r\n**Code**\r\n\r\n```ts\r\n/**\r\n * @typedef LoadCallback\r\n * @type {function}\r\n */\r\ntype LoadCallback = void;\r\n```\r\n\r\n**Expected behavior:** Code compiles successfully.\r\n\r\n**Actual behavior:**\r\nCompiler crashes with the following error:\r\n\r\n```\r\n/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:9921\r\n for (var _i = 0, _a = node.jsDocPropertyTags; _i \u003c _a.length; _i++) {\r\n ^\r\n\r\nTypeError: Cannot read property 'length' of undefined\r\n at Object.forEachChild (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:9921:70)\r\n at setParentPointers (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:17392:12)\r\n at /tmp/chris/downloads/node_modules/typescript/lib/tsc.js:17392:64\r\n at visitNode (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:9533:24)\r\n at Object.forEachChild (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:9918:25)\r\n at setParentPointers (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:17392:12)\r\n at /tmp/chris/downloads/node_modules/typescript/lib/tsc.js:17392:64\r\n at visitNodes (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:9542:30)\r\n at Object.forEachChild (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:9891:24)\r\n at setParentPointers (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:17392:12)\r\n at bindChildrenWorker (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:15178:25)\r\n at bindChildren (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:15140:17)\r\n at bindContainer (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:15122:17)\r\n at bind (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:16214:21)\r\n at bindEach (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:15157:21)\r\n at visitNodes (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:9538:24)\r\n at Object.forEachChild (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:9707:24)\r\n at bindEachChild (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:15165:16)\r\n at bindChildrenWorker (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:15254:21)\r\n at bindChildren (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:15140:17)\r\n at bindContainer (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:15093:17)\r\n at bind (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:16214:21)\r\n at bindSourceFile (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:14851:17)\r\n at Object.bindSourceFile (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:14809:9)\r\n at initializeTypeChecker (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:36496:20)\r\n at Object.createTypeChecker (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:18543:9)\r\n at getDiagnosticsProducingTypeChecker (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:56042:93)\r\n at Object.getGlobalDiagnostics (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:56370:53)\r\n at compileProgram (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:59092:78)\r\n at compile (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:59051:26)\r\n at performCompilation (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:58940:33)\r\n at Object.executeCommandLine (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:58883:9)\r\n at Object.\u003canonymous> (/tmp/chris/downloads/node_modules/typescript/lib/tsc.js:59241:4)\r\n at Module._compile (module.js:573:30)\r\n at Object.Module._extensions..js (module.js:584:10)\r\n at Module.load (module.js:507:32)\r\n at tryModuleLoad (module.js:470:12)\r\n at Function.Module._load (module.js:462:3)\r\n at Module.require (module.js:517:17)\r\n at require (internal/module.js:11:18)\r\n at Object.\u003canonymous> (/tmp/chris/downloads/node_modules/typescript/bin/tsc:2:1)\r\n at Module._compile (module.js:573:30)\r\n at Object.Module._extensions..js (module.js:584:10)\r\n at Module.load (module.js:507:32)\r\n at tryModuleLoad (module.js:470:12)\r\n at Function.Module._load (module.js:462:3)\r\n at Function.Module.runMain (module.js:609:10)\r\n at startup (bootstrap_node.js:158:16)\r\n at bootstrap_node.js:598:3\r\n```","author":{"url":"https://github.com/lambda-fairy","@type":"Person","name":"lambda-fairy"},"datePublished":"2017-09-07T05:45:29Z","url":"https://github.com/microsoft/TypeScript/issues/18301"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:87faddc2-41a8-c2f6-a71d-ef6c7f5d91b8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C394:D5AA4:D63163:11F2B8E:6B00F73F |
| html-safe-nonce | 2f32dfea5695ab552e8e336d5f556ef9043a786e1b14959a07e5258bf192619b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzk0OkQ1QUE0OkQ2MzE2MzoxMUYyQjhFOjZCMDBGNzNGIiwidmlzaXRvcl9pZCI6IjI0NjAwNzAxODQxODcxMzE3MTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d3ebbafb6124c9d80ce49b5429fb9c1a01d4d361d59cde1ecf0c3ee1273d6398 |
| hovercard-subject-tag | issue:255821901 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/18301/issue_layout |
| twitter:image | https://opengraph.githubassets.com/43eda45c1e70afd43797c444e545444e96dc5da919652ed3d2a5975f4eefc30d/microsoft/TypeScript/issues/18301 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/43eda45c1e70afd43797c444e545444e96dc5da919652ed3d2a5975f4eefc30d/microsoft/TypeScript/issues/18301 |
| og:image:alt | TypeScript Version: 2.5.2 and 2.6.0-dev.20170906 (can reproduce on both versions) Code /** * @typedef LoadCallback * @type {function} */ type LoadCallback = void; Expected behavior: Code compiles s... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lambda-fairy |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width