(type, node, reportError)
| 74487 | ts.Diagnostics.Cannot_invoke_an_object_which_is_possibly_null); |
| 74488 | } |
| 74489 | function checkNonNullTypeWithReporter(type, node, reportError) { |
| 74490 | if (strictNullChecks && type.flags & 2 /* TypeFlags.Unknown */) { |
| 74491 | error(node, ts.Diagnostics.Object_is_of_type_unknown); |
| 74492 | return errorType; |
| 74493 | } |
| 74494 | var kind = (strictNullChecks ? getFalsyFlags(type) : type.flags) & 98304 /* TypeFlags.Nullable */; |
| 74495 | if (kind) { |
| 74496 | reportError(node, kind); |
| 74497 | var t = getNonNullableType(type); |
| 74498 | return t.flags & (98304 /* TypeFlags.Nullable */ | 131072 /* TypeFlags.Never */) ? errorType : t; |
| 74499 | } |
| 74500 | return type; |
| 74501 | } |
| 74502 | function checkNonNullType(type, node) { |
| 74503 | return checkNonNullTypeWithReporter(type, node, reportObjectPossiblyNullOrUndefinedError); |
| 74504 | } |
no test coverage detected
searching dependent graphs…