diff --git a/README.md b/README.md index 263ffe0..a83318d 100644 --- a/README.md +++ b/README.md @@ -243,7 +243,7 @@ This is a useful way of telling TypeScript what the real type of an expression i The reason we need to do so in this case is that `getElementById`'s return type is `HTMLElement | null`. Put simply, `getElementById` returns `null` when it can't find an element with a given `id`. -We're assuming that `getElementById` will actually succeed, so we need convince TypeScript of that using the `as` syntax. +We're assuming that `getElementById` will actually succeed, so we need to convince TypeScript of that using the `as` syntax. TypeScript also has a trailing "bang" syntax (`!`), which removes `null` and `undefined` from the prior expression. So we *could* have written `document.getElementById('root')!`, but in this case we wanted to be a bit more explicit.