mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Add typing for scrollparentjs 2.0
This commit is contained in:
parent
b1285dace3
commit
918506e97b
8
types/scrollparent/index.d.ts
vendored
Normal file
8
types/scrollparent/index.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
// Type definitions for scrollparent 2.0
|
||||
// Project: https://github.com/olahol/scrollparent.js#readme
|
||||
// Definitions by: Sintifo <https://github.com/Sintifo>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare function scrollparent(node: HTMLElement | SVGElement): HTMLElement | null;
|
||||
|
||||
export = scrollparent;
|
||||
6
types/scrollparent/scrollparent-tests.tsx
Normal file
6
types/scrollparent/scrollparent-tests.tsx
Normal file
@ -0,0 +1,6 @@
|
||||
import scrollparent = require("scrollparent");
|
||||
|
||||
const elem = document.getElementById("content");
|
||||
if (elem) {
|
||||
scrollparent(elem);
|
||||
}
|
||||
24
types/scrollparent/tsconfig.json
Normal file
24
types/scrollparent/tsconfig.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strictFunctionTypes": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"scrollparent-tests.tsx"
|
||||
]
|
||||
}
|
||||
1
types/scrollparent/tslint.json
Normal file
1
types/scrollparent/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user