Skip to content

Commit

Permalink
fix(lazy): adjust the type of defineCustomElements
Browse files Browse the repository at this point in the history
This fixes an issue with the type for `defineCustomElements` that we set
in output-lazy-loader.ts. In #4419 we changed the return type of the
function to be `void` (at runtime) but we didn't make a corresponding
adjustment to the type declaration for the function that we generate
here:

https://github.com/ionic-team/stencil/blob/7d5dc6cf5e0d2020c513cc87b6b2e5b93eece9bc/src/compiler/output-targets/output-lazy-loader.ts#L88

This change adjusts that type declaration to have a `void` return value,
instead of `Promise<void>`.

See #4589 for more context
  • Loading branch information
alicewriteswrongs committed Jul 18, 2023
1 parent 7d5dc6c commit cb8df56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/output-targets/output-lazy-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export interface CustomElementsDefineOptions {
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
}
export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): Promise<void>;
export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): void;
export declare function applyPolyfills(): Promise<void>;
/**
Expand Down

0 comments on commit cb8df56

Please sign in to comment.