TypeScript/tests/baselines/reference/parserShorthandPropertyAssignment1.errors.txt

12 lines
768 B
Plaintext

tests/cases/conformance/parser/ecmascript6/ShorthandPropertyAssignment/parserShorthandPropertyAssignment1.ts(3,11): error TS1162: An object member cannot be declared optional.
tests/cases/conformance/parser/ecmascript6/ShorthandPropertyAssignment/parserShorthandPropertyAssignment1.ts(3,16): error TS1162: An object member cannot be declared optional.
==== tests/cases/conformance/parser/ecmascript6/ShorthandPropertyAssignment/parserShorthandPropertyAssignment1.ts (2 errors) ====
function foo(obj: { name?: string; id: number }) { }
var name:any, id: any;
foo({ name?, id? });
~
!!! error TS1162: An object member cannot be declared optional.
~
!!! error TS1162: An object member cannot be declared optional.