So I am trying out the AOT in angular-cli and am stumped by the following output when I run:
node_modules/.bin/ngc -p tsconfig-aot.json
Error:
> app/service/login.service.ts:14:51: Parameter 'fulfill' implicitly has
> an 'any' type. /app/service/login.service.ts:14:60: Parameter 'reject'
> implicitly has an 'any' app.component.ts:74:5: Member 'isLoggedIn'
> implicitly has an 'any' type.
Any idea what would cause this and how to fix it?
Details:
@angular/cli: 1.0.0-rc.0
node: 7.6.0
os: darwin x64
@angular/common: 2.4.9
@angular/compiler: 2.4.9
@angular/compiler-cli: 2.4.9
@angular/core: 2.4.9
@angular/forms: 2.4.9
@angular/http: 2.4.9
@angular/platform-browser: 2.4.9
@angular/platform-browser-dynamic: 2.4.9
@angular/platform-server: 2.4.9
@angular/router: 3.4.9
@angular/cli: 1.0.0-rc.0
MacBook-Pro-2:www-fairplay bjnash$ tsc -v
Version 2.2.1Version 2.2.1
app/service/login.service.ts:14:51: Parameter 'fulfill' implicitly has an 'any' type. /app/service/login.service.ts:14:60: Parameter 'reject' implicitly has an 'any' app.component.ts:74:5: Member 'isLoggedIn' implicitly has an 'any' type.
Just add a :any
to those vars.
login.service.ts replace fulfill
declaration to fulfill: any
, reject
for reject: any
.
app.component.ts replace isLoggedIn
declaration for isLoggedIn: any
.
Also if you want to leave all as you have it, check your tsconfig-aot.json
Find this line, it should be set to false
"noImplicitAny": true
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments