diff --git a/types/makeup-floating-label/index.d.ts b/types/makeup-floating-label/index.d.ts new file mode 100644 index 0000000000..7b35349554 --- /dev/null +++ b/types/makeup-floating-label/index.d.ts @@ -0,0 +1,12 @@ +// Type definitions for makeup-floating-label 0.0 +// Project: https://github.com/makeup-js/makeup-floating-label#readme +// Definitions by: Timur Manyanov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.9 + +declare class FloatingLabel { + constructor(el: any, userOptions?: any); + refresh(): void; +} + +export = FloatingLabel; diff --git a/types/makeup-floating-label/makeup-floating-label-tests.ts b/types/makeup-floating-label/makeup-floating-label-tests.ts new file mode 100644 index 0000000000..3883e4135f --- /dev/null +++ b/types/makeup-floating-label/makeup-floating-label-tests.ts @@ -0,0 +1,9 @@ +import FloatingLabel = require('makeup-floating-label'); + +const widgetEls = document.querySelectorAll('.floating-label'); + +widgetEls.forEach((el: Element) => { + const widget = new FloatingLabel(el); + + widget.refresh(); +}); diff --git a/types/makeup-floating-label/tsconfig.json b/types/makeup-floating-label/tsconfig.json new file mode 100644 index 0000000000..c7fed3a8c4 --- /dev/null +++ b/types/makeup-floating-label/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom", + "dom.iterable" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "makeup-floating-label-tests.ts" + ] +} diff --git a/types/makeup-floating-label/tslint.json b/types/makeup-floating-label/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/makeup-floating-label/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }