1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
tests/cases/compiler/implicitAnyDeclareMemberWithoutType.ts(3,5): error TS7008: Member 'member1' implicitly has an 'any' type.
tests/cases/compiler/implicitAnyDeclareMemberWithoutType.ts(5,5): error TS7010: 'constructor', which lacks return-type annotation, implicitly has an 'any' return type.
tests/cases/compiler/implicitAnyDeclareMemberWithoutType.ts(5,17): error TS7006: Parameter 'c1' implicitly has an 'any' type.
tests/cases/compiler/implicitAnyDeclareMemberWithoutType.ts(5,33): error TS7006: Parameter 'c3' implicitly has an 'any' type.
tests/cases/compiler/implicitAnyDeclareMemberWithoutType.ts(6,5): error TS7010: 'funcOfIFace', which lacks return-type annotation, implicitly has an 'any' return type.
tests/cases/compiler/implicitAnyDeclareMemberWithoutType.ts(6,17): error TS7006: Parameter 'f1' implicitly has an 'any' type.
tests/cases/compiler/implicitAnyDeclareMemberWithoutType.ts(6,21): error TS7006: Parameter 'f2' implicitly has an 'any' type.
tests/cases/compiler/implicitAnyDeclareMemberWithoutType.ts(7,5): error TS7013: Construct signature, which lacks return-type annotation, implicitly has an 'any' return type.
==== tests/cases/compiler/implicitAnyDeclareMemberWithoutType.ts (8 errors) ====
// this should be an error
interface IFace {
member1; // error at "member1"
~~~~~~~
!!! error TS7008: Member 'member1' implicitly has an 'any' type.
member2: string;
constructor(c1, c2: string, c3); // error at "c1, c3, "constructor"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS7010: 'constructor', which lacks return-type annotation, implicitly has an 'any' return type.
~~
!!! error TS7006: Parameter 'c1' implicitly has an 'any' type.
~~
!!! error TS7006: Parameter 'c3' implicitly has an 'any' type.
funcOfIFace(f1, f2, f3: number); // error at "f1, f2, funcOfIFace"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS7010: 'funcOfIFace', which lacks return-type annotation, implicitly has an 'any' return type.
~~
!!! error TS7006: Parameter 'f1' implicitly has an 'any' type.
~~
!!! error TS7006: Parameter 'f2' implicitly has an 'any' type.
new ();
~~~~~~~
!!! error TS7013: Construct signature, which lacks return-type annotation, implicitly has an 'any' return type.
}
|