Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Compiled with --strictNullChecks
- 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
- }
Add Comment
Please, Sign In to add comment