Add no-scroll typing

This commit is contained in:
Zhang Yi Jiang
2019-02-14 13:12:31 +08:00
parent 93ed5c2843
commit 2c708fc0a3
4 changed files with 42 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
// Type definitions for no-scroll 2.1
// Project: https://github.com/davidtheclark/no-scroll
// Definitions by: Zhang Yi Jiang <https://github.com/ZhangYiJiang>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface NoScroll {
off(): void;
on(): void;
toggle(): void;
}
declare const noScroll: NoScroll;
export = noScroll;
+5
View File
@@ -0,0 +1,5 @@
import * as noScroll from 'no-scroll';
noScroll.on();
noScroll.off();
noScroll.toggle();
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"no-scroll-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }