2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/implicitAnyDeclareMemberWithoutType.ts (8 errors) ====
|
|
|
|
// this should be an error
|
|
|
|
interface IFace {
|
|
|
|
member1; // error at "member1"
|
|
|
|
~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS7008: Member 'member1' implicitly has an 'any' type.
|
2014-07-13 01:04:16 +02:00
|
|
|
member2: string;
|
|
|
|
constructor(c1, c2: string, c3); // error at "c1, c3, "constructor"
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS7010: 'constructor', which lacks return-type annotation, implicitly has an 'any' return type.
|
2014-07-13 01:04:16 +02:00
|
|
|
~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS7006: Parameter 'c1' implicitly has an 'any' type.
|
2014-07-13 01:04:16 +02:00
|
|
|
~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS7006: Parameter 'c3' implicitly has an 'any' type.
|
2014-07-13 01:04:16 +02:00
|
|
|
funcOfIFace(f1, f2, f3: number); // error at "f1, f2, funcOfIFace"
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS7010: 'funcOfIFace', which lacks return-type annotation, implicitly has an 'any' return type.
|
2014-07-13 01:04:16 +02:00
|
|
|
~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS7006: Parameter 'f1' implicitly has an 'any' type.
|
2014-07-13 01:04:16 +02:00
|
|
|
~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS7006: Parameter 'f2' implicitly has an 'any' type.
|
2014-07-13 01:04:16 +02:00
|
|
|
new ();
|
|
|
|
~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS7013: Construct signature, which lacks return-type annotation, implicitly has an 'any' return type.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
|