mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 23:07:06 +00:00
morphdom: Provides its own types (#39471)
This commit is contained in:
committed by
Jesse Trinity
parent
29b1ea49a9
commit
4a68227028
@@ -2214,6 +2214,12 @@
|
||||
"sourceRepoURL": "https://github.com/sindresorhus/month-days",
|
||||
"asOfVersion": "3.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "morphdom",
|
||||
"typingsPackageName": "morphdom",
|
||||
"sourceRepoURL": "https://github.com/patrick-steele-idem/morphdom",
|
||||
"asOfVersion": "2.4.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "move-file",
|
||||
"typingsPackageName": "move-file",
|
||||
|
||||
Vendored
-24
@@ -1,24 +0,0 @@
|
||||
// Type definitions for morphdom 2.3
|
||||
// Project: https://github.com/patrick-steele-idem/morphdom
|
||||
// Definitions by: arvitaly <https://github.com/arvitaly>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
interface MorphDomOptions {
|
||||
getNodeKey?: (node: Node) => any;
|
||||
onBeforeNodeAdded?: (node: Node) => Node;
|
||||
onNodeAdded?: (node: Node) => Node;
|
||||
onBeforeElUpdated?: (fromEl: HTMLElement, toEl: HTMLElement) => boolean;
|
||||
onElUpdated?: (el: HTMLElement) => void;
|
||||
onBeforeNodeDiscarded?: (node: Node) => boolean;
|
||||
onNodeDiscarded?: (node: Node) => void;
|
||||
onBeforeElChildrenUpdated?: (fromEl: HTMLElement, toEl: HTMLElement) => boolean;
|
||||
childrenOnly?: boolean;
|
||||
}
|
||||
|
||||
declare function morphdom(
|
||||
fromNode: Node,
|
||||
toNode: Node | string,
|
||||
options?: MorphDomOptions,
|
||||
): void;
|
||||
|
||||
export = morphdom;
|
||||
@@ -1,20 +0,0 @@
|
||||
import morphdom = require("morphdom");
|
||||
|
||||
declare var node1: Node;
|
||||
declare var node2: Node;
|
||||
declare var el1: HTMLElement;
|
||||
declare var el2: HTMLElement;
|
||||
|
||||
morphdom(node1, node2);
|
||||
morphdom(node1, node2, {});
|
||||
morphdom(node1, node2, {
|
||||
childrenOnly: true,
|
||||
getNodeKey: (node) => null,
|
||||
onBeforeElChildrenUpdated: (el1, el2) => true,
|
||||
onBeforeElUpdated: (el1, el2) => true,
|
||||
onBeforeNodeAdded: (node) => node1,
|
||||
onBeforeNodeDiscarded: (node) => false,
|
||||
onElUpdated: (el) => null,
|
||||
onNodeAdded: (node) => node2,
|
||||
onNodeDiscarded: (node) => null,
|
||||
});
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"morphdom-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Reference in New Issue
Block a user