-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type definition for idiomoph #16
Comments
I've used this based on a flick through the code... declare interface Idiomorph {
morph: (oldNode: Element | Document, newContent?: string | Element | Iterable<Element> | null, options?: {
morphStyle?: "innerHTML" | "outerHTML";
ignoreActive?: boolean;
ignoreActiveValue?: boolean;
head?: {
style?: "merge" | "append" | "morph" | "none";
};
callbacks?: {
beforeNodeAdded: (node: ChildNode) => void | boolean;
afterNodeAdded: (node: ChildNode) => void;
beforeNodeMorphed: (oldNode: Element, newNode: Element) => void | boolean;
afterNodeMorphed: (oldNode: Element, newNode: Element) => void;
beforeNodeRemoved: (node: ChildNode) => void | boolean;
afterNodeRemoved: (node: ChildNode) => void;
};
}) => undefined | Iterable<ChildNode>;
}
declare let Idiomorph: Idiomorph; |
Happy to accept a PR for this |
I've ported idiomorph to TS, might be useful for the typedefs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Typescript support for idiomorph
The text was updated successfully, but these errors were encountered: