Browse Source

Fix TS type for replaceWith method (#5504)

pull/5524/head
Grigore Robert George 2 years ago
committed by GitHub
parent
commit
970ef290a2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/dom_components/model/Component.ts

2
src/dom_components/model/Component.ts

@ -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);

Loading…
Cancel
Save