Skip to content

Commit

Permalink
Fix TS type for replaceWith method (#5504)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxwellTheSecond authored Nov 8, 2023
1 parent 4e8e0a1 commit 970ef29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dom_components/model/Component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ export default class Component extends StyleableModel<ComponentProperties> {
* component.replaceWith('<div>Some new content</div>');
* // -> Component
*/
replaceWith(el: Component) {
replaceWith(el: Component | String) {
const coll = this.collection;
const at = coll.indexOf(this);
coll.remove(this);
Expand Down

0 comments on commit 970ef29

Please sign in to comment.