1.10.12.1. fejezet, Non-Null associations

Minták

const img = document.querySelector("img")!
img.src = "valami.png"
function validateEntity(e?: Entity) {
    // Throw exception if e is null or invalid entity
}
 
function processEntity(e?: Entity) {
    validateEntity(e);
    let s = e!.name;  // Assert that e is non-null and access name
}