Guest User

Untitled

a guest
Mar 23rd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. // Compiled with --strictNullChecks
  2. function validateEntity(e?: Entity) {
  3. // Throw exception if e is null or invalid entity
  4. }
  5.  
  6. function processEntity(e?: Entity) {
  7. validateEntity(e);
  8. let s = e!.name; // Assert that e is non-null and access name
  9. }
Add Comment
Please, Sign In to add comment