mirror of
https://github.com/archtechx/alpine-typescript.git
synced 2025-12-11 22:34:03 +00:00
Change to CallableFunctions and AlpineComponent
This commit is contained in:
parent
b8f5b461bb
commit
d7d4674b17
1 changed files with 5 additions and 7 deletions
12
src/index.ts
12
src/index.ts
|
|
@ -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 } {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue