1
0
Fork 0
mirror of https://github.com/archtechx/alpine-typescript.git synced 2025-12-12 06:44:03 +00:00

Change to CallableFunctions and AlpineComponent

This commit is contained in:
Rafik El Hadi Houari 2021-05-17 16:19:35 +01:00 committed by GitHub
parent b8f5b461bb
commit d7d4674b17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,16 +24,16 @@ export abstract class AlpineComponent {
[key: string]: any;
}
export declare type Alpine = {
declare type Alpine = {
version: string;
pauseMutationObserver: boolean;
magicProperties: { [name: string]: function };
magicProperties: { [name: string]: CallableFunction };
ignoreFocusedForValueBinding: boolean;
pauseMutationObserver: boolean;
onComponentInitializeds: Array<any>;
onBeforeComponentInitializeds: Array<any>;
onComponentInitializeds: (callback: function) => void;
onBeforeComponentInitializeds: (callback: function) => void;
onComponentInitializeds: (callback: CallableFunction) => void;
onBeforeComponentInitializeds: (callback: CallableFunction) => void;
listenForNewUninitializedComponentsAtRunTime: () => undefined;
discoverUninitializedComponents: (
callback: (rootEl: HTMLElement) => void,
@ -42,9 +42,7 @@ export declare type Alpine = {
discoverComponents: (callback: (rootEl: HTMLElement) => void) => void;
start: () => void;
addMagicProperty(name: string, callback: ($el: HTMLElement) => void);
clone: (component: any, newEl: HTMLElement) => void;
[key: string]: any;
clone: (component: AlpineComponent, newEl: HTMLElement) => void;
};
export function registerComponents(components: { [name: string]: Function }): { [name: string]: ComponentConstructor } {