title: Angular cli build prod: TypeError: Cannot read property 'kind' of undefined
body: <p>I try to build project with Angular CLI <code>ng build --prod</code> and I get this error:</p>
  
  <blockquote>
    <p>ERROR in TypeError: Cannot read property 'kind' of undefined</p>
  </blockquote>
  
  <p><strong>if I build with not <code>--prod</code> I do not get any error</strong></p>
  
  <p>Full error:</p>
  
  <pre><code>ERROR in TypeError: Cannot read property 'kind' of undefined
      at isParameterPropertyDeclaration (node_modules/typescript/lib/typescript.js:13445:88)
      at Object.filter (node_modules/typescript/lib/typescript.js:469:31)
      at transformClassMembers (node_modules/typescript/lib/typescript.js:70813:20)
      at createClassDeclarationHeadWithoutDecorators (node_modules/typescript/lib/typescript.js:70665:110)
      at visitClassDeclaration (node_modules/typescript/lib/typescript.js:70584:19)
      at visitTypeScript (node_modules/typescript/lib/typescript.js:70432:28)
      at visitorWorker (node_modules/typescript/lib/typescript.js:70227:24)
      at sourceElementVisitorWorker (node_modules/typescript/lib/typescript.js:70252:28)
      at saveStateAndInvoke (node_modules/typescript/lib/typescript.js:70165:27)
      at sourceElementVisitor (node_modules/typescript/lib/typescript.js:70237:20)
      at visitNodes (node_modules/typescript/lib/typescript.js:67751:48)
      at Object.visitLexicalEnvironment (node_modules/typescript/lib/typescript.js:67784:22)
      at visitSourceFile (node_modules/typescript/lib/typescript.js:70521:53)
      at saveStateAndInvoke (node_modules/typescript/lib/typescript.js:70165:27)
      at transformSourceFile (node_modules/typescript/lib/typescript.js:70147:27)
      at transformSourceFileOrBundle (node_modules/typescript/lib/typescript.js:70127:20)
  </code></pre>
  
  <p>Angular version:</p>
  
  <pre><code>Angular CLI: 8.3.3
  Node: 12.9.0
  OS: darwin x64
  Angular: 9.0.0-next.5
  ... animations, common, compiler, compiler-cli, core, forms
  ... language-service, localize, platform-browser
  ... platform-browser-dynamic, router
  
  Package                            Version
  ------------------------------------------------------------
  @angular-devkit/architect          0.900.0-next.3
  @angular-devkit/build-angular      0.900.0-next.3
  @angular-devkit/build-optimizer    0.900.0-next.3
  @angular-devkit/build-webpack      0.900.0-next.3
  @angular-devkit/core               9.0.0-next.3
  @angular-devkit/schematics         8.3.3
  @angular/cdk                       8.1.4
  @angular/cli                       8.3.3
  @angular/http                      8.0.0-beta.10
  @angular/material                  8.1.4
  @angular/material-moment-adapter   8.1.4
  @ngtools/webpack                   9.0.0-next.3
  @schematics/angular                8.3.3
  @schematics/update                 0.803.3
  rxjs                               6.5.3
  typescript                         3.6.3
  webpack                            4.39.3
  </code></pre>
  
  <p>Thanks.</p>