Files
tsgo/testdata/baselines/reference/submodule/conformance/definiteAssignmentAssertionsWithObjectShortHand.errors.txt

15 lines
642 B
Plaintext

definiteAssignmentAssertionsWithObjectShortHand.ts(2,16): error TS1255: A definite assignment assertion '!' is not permitted in this context.
definiteAssignmentAssertionsWithObjectShortHand.ts(5,7): error TS1162: An object member cannot be declared optional.
==== definiteAssignmentAssertionsWithObjectShortHand.ts (2 errors) ====
const a: string | undefined = 'ff';
const foo = { a! }
~
!!! error TS1255: A definite assignment assertion '!' is not permitted in this context.
const bar = {
a ? () { }
~
!!! error TS1162: An object member cannot be declared optional.
}