fix: update types
This commit is contained in:
parent
8ff81c7e20
commit
e5aaea52b3
1 changed files with 7 additions and 2 deletions
|
@ -14,7 +14,10 @@ declare const Astro: {
|
|||
|
||||
{
|
||||
// @ts-ignore
|
||||
(self.Astro || (self.Astro = {})).assign = (script,value) => Object.assign(script.parentElement,value);
|
||||
(self.Astro || (self.Astro = {})).assign = (script,value) => {
|
||||
Object.assign(script.parentElement,value);
|
||||
script.remove();
|
||||
};
|
||||
|
||||
if (!customElements.get('astro-island')) {
|
||||
customElements.define(
|
||||
|
@ -28,6 +31,7 @@ declare const Astro: {
|
|||
public rendererUrl = '';
|
||||
public componentUrl = '';
|
||||
public componentExport = 'default';
|
||||
public beforeHydrationUrl = '';
|
||||
|
||||
connectedCallback() {
|
||||
if (!this.hasAttribute('await-children') || this.firstChild) {
|
||||
|
@ -44,11 +48,12 @@ declare const Astro: {
|
|||
}
|
||||
}
|
||||
async childrenConnectedCallback() {
|
||||
let { beforeHydrationUrl } = this as any;
|
||||
let { beforeHydrationUrl } = this;
|
||||
if (beforeHydrationUrl) {
|
||||
await import(beforeHydrationUrl);
|
||||
}
|
||||
this.start();
|
||||
this.removeAttribute('await-children');
|
||||
}
|
||||
start() {
|
||||
const { opts } = this;
|
||||
|
|
Loading…
Reference in a new issue