Sunday, February 11, 2018

@angular/platform-browser/src/browser/transfer_state.d.ts (34,40): ',' expected.

Error:

`ERROR in [at-loader] ./node_modules/@angular/platform-browser/src/browser/transfer_state.d.ts:34:40 TS1005: ',' expected. ERROR in [at-loader] ./node_modules/@angular/platform-browser/src/browser/transfer_state.d.ts:34:42 TS1139: Type parameter declaration expected. ERROR in [at-loader] ./node_modules/@angular/platform-browser/src/browser/transfer_state.d.ts:34:46 TS1109: Expression expected. ERROR in [at-loader] ./node_modules/@angular/platform-browser/src/browser/transfer_state.d.ts:34:51 TS1005: ')' expected. ERROR in [at-loader] ./node_modules/@angular/platform-browser/src/browser/transfer_state.d.ts:34:59 TS1005: ';' expected. ERROR in [at-loader] ./node_modules/@angular/platform-browser/src/browser/transfer_state.d.ts:34:60 TS1128: Declaration or statement expected. ERROR in [at-loader] ./node_modules/@angular/platform-browser/src/browser/transfer_state.d.ts:34:73 TS1005: '(' expected. ERROR in [at-loader] ./node_modules/@angular/platform-browser/src/browser/transfer_state.d.ts:34:42 TS2532: Object is possibly 'undefined'. ERROR in [at-loader] ./node_modules/@angular/platform-browser/src/browser/transfer_state.d.ts:34:48 TS2304: Cannot find name 'key'. ERROR in [at-loader] ./node_modules/@angular/platform-browser/src/browser/transfer_state.d.ts:34:53 TS2304: Cannot find name 'string'. ERROR in [at-loader] ./node_modules/@angular/platform-browser/src/browser/transfer_state.d.ts:34:62 TS2693: 'StateKey' only refers to a type, but is being used as a value here.`

Solution:

Update your typescript dependency to the latest version

 "devDependencies": {
   .....
    "typescript": "^2.6.1"
  }


Reactions: