From f81d3f61997909d2c01f4deda24afad5bf256ffa Mon Sep 17 00:00:00 2001 From: tphobe9312 Date: Wed, 8 Jul 2020 10:40:16 +0530 Subject: [PATCH] docs(elements): fix typo (you custom element --> your custom element) (#37966) PR Close #37966 --- aio/content/guide/elements.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/elements.md b/aio/content/guide/elements.md index 83299ddc31..7e84417df2 100644 --- a/aio/content/guide/elements.md +++ b/aio/content/guide/elements.md @@ -186,7 +186,7 @@ aDialog.content = 123; // <-- ERROR: TypeScript knows this should be a string. aDialog.body = 'News'; // <-- ERROR: TypeScript knows there is no `body` property on `aDialog`. ``` -This is a good way to quickly get TypeScript features, such as type checking and autocomplete support, for you custom element. But it can get cumbersome if you need it in several places, because you have to cast the return type on every occurrence. +This is a good way to quickly get TypeScript features, such as type checking and autocomplete support, for your custom element. But it can get cumbersome if you need it in several places, because you have to cast the return type on every occurrence. An alternative way, that only requires defining each custom element's type once, is augmenting the `HTMLElementTagNameMap`, which TypeScript uses to infer the type of a returned element based on its tag name (for DOM methods such as `document.createElement()`, `document.querySelector()`, etc.):