fix(typescript): add no-update-body and no-update-body-if (#1945)

* fix(typescript): add no-update-body and no-update-body-if

* Create changeset
This commit is contained in:
Luke LaValva 2023-04-25 13:01:01 -07:00 committed by GitHub
parent e940554405
commit ce2ab47637
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 2 deletions

View File

@ -0,0 +1,5 @@
---
"marko": patch
---
fix(typescript): add no-update-body and no-update-body-if

View File

@ -2303,14 +2303,25 @@ declare global {
key?: AttrString;
/**
* Tells Marko to avoid updating the element or it's contents (excluding custom tags which may rerender independently).
* Tells Marko to avoid updating the element or its contents (excluding custom tags which may rerender independently).
*/
"no-update"?: AttrBoolean;
/**
* Tells Marko to avoid updating an elements contents (excluding custom tags which may rerender independently).
* Tells Marko to avoid updating an element's contents (excluding custom tags which may rerender independently). Used instead of no-update when runtime functionality is needed.
*/
"no-update-if"?: AttrBoolean;
/**
* Tells Marko to avoid updating an element's body.
*/
"no-update-body"?: AttrBoolean;
/**
* Tells Marko to avoid updating an element's body. Used instead of no-update-body when runtime functionality is needed.
* @see https://markojs.com/docs/syntax/#conditional-rendering
*/
"no-update-body-if"?: AttrBoolean;
}
interface HTMLAttributes<T extends Element = Element>