2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/optionalPropertiesSyntax.ts(11,7): error TS1005: ';' expected.
|
|
|
|
tests/cases/compiler/optionalPropertiesSyntax.ts(11,8): error TS1131: Property or signature expected.
|
|
|
|
tests/cases/compiler/optionalPropertiesSyntax.ts(12,5): error TS1131: Property or signature expected.
|
|
|
|
tests/cases/compiler/optionalPropertiesSyntax.ts(18,11): error TS1005: ';' expected.
|
|
|
|
tests/cases/compiler/optionalPropertiesSyntax.ts(18,12): error TS1131: Property or signature expected.
|
|
|
|
tests/cases/compiler/optionalPropertiesSyntax.ts(32,18): error TS1005: ';' expected.
|
|
|
|
tests/cases/compiler/optionalPropertiesSyntax.ts(32,19): error TS1131: Property or signature expected.
|
|
|
|
tests/cases/compiler/optionalPropertiesSyntax.ts(33,5): error TS1131: Property or signature expected.
|
|
|
|
tests/cases/compiler/optionalPropertiesSyntax.ts(4,5): error TS2386: Overload signatures must all be optional or required.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/compiler/optionalPropertiesSyntax.ts(24,5): error TS2300: Duplicate identifier 'prop'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/optionalPropertiesSyntax.ts(25,5): error TS2300: Duplicate identifier 'prop'.
|
|
|
|
tests/cases/compiler/optionalPropertiesSyntax.ts(32,5): error TS2375: Duplicate number index signature.
|
|
|
|
tests/cases/compiler/optionalPropertiesSyntax.ts(33,7): error TS2375: Duplicate number index signature.
|
|
|
|
tests/cases/compiler/optionalPropertiesSyntax.ts(34,5): error TS2375: Duplicate number index signature.
|
|
|
|
|
|
|
|
|
2014-11-19 03:44:53 +01:00
|
|
|
==== tests/cases/compiler/optionalPropertiesSyntax.ts (14 errors) ====
|
2014-07-13 01:04:16 +02:00
|
|
|
interface fnSigs {
|
|
|
|
//functions signatures can be optional
|
|
|
|
fn(): void;
|
|
|
|
fn?(): void; //err
|
|
|
|
~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2386: Overload signatures must all be optional or required.
|
2014-07-13 01:04:16 +02:00
|
|
|
fn2?(): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface callSig {
|
|
|
|
//Call signatures can't be optional
|
|
|
|
(): any;
|
|
|
|
()?: any; //err
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1005: ';' expected.
|
2014-07-13 01:04:16 +02:00
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1131: Property or signature expected.
|
2014-07-13 01:04:16 +02:00
|
|
|
?(): any; //err
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1131: Property or signature expected.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
interface constructSig {
|
|
|
|
//Construct signatures can't be optional
|
|
|
|
new (): any;
|
|
|
|
new ()?: any; //err
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1005: ';' expected.
|
2014-07-13 01:04:16 +02:00
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1131: Property or signature expected.
|
2014-07-13 01:04:16 +02:00
|
|
|
new ?(): any; //err
|
|
|
|
}
|
|
|
|
|
|
|
|
interface propertySig {
|
|
|
|
//Property signatures can be optional
|
|
|
|
prop: any;
|
|
|
|
~~~~
|
2014-10-01 02:15:18 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'prop'.
|
|
|
|
prop?: any;
|
2014-10-01 20:27:20 +02:00
|
|
|
~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'prop'.
|
2014-07-13 01:04:16 +02:00
|
|
|
prop2?: any;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface indexSig {
|
|
|
|
//Index signatures can't be optional
|
|
|
|
[idx: number]: any;
|
|
|
|
[idx: number]?: any; //err
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1005: ';' expected.
|
2014-07-13 01:04:16 +02:00
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1131: Property or signature expected.
|
2014-07-13 01:04:16 +02:00
|
|
|
~~~~~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2375: Duplicate number index signature.
|
2014-07-13 01:04:16 +02:00
|
|
|
? [idx: number]: any; //err
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1131: Property or signature expected.
|
2014-07-13 01:04:16 +02:00
|
|
|
~~~~~~~~~~~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2375: Duplicate number index signature.
|
2014-07-13 01:04:16 +02:00
|
|
|
[idx?: number]: any; //err
|
|
|
|
~~~~~~~~~~~~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2375: Duplicate number index signature.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|