mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
15 lines
642 B
Plaintext
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.
|
|
} |