Add makeup-screenreader-trap definitions

This commit is contained in:
Timur Manyanov
2018-11-02 10:18:08 +01:00
parent f8721b6253
commit d595662faa
4 changed files with 43 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
// Type definitions for makeup-screenreader-trap 0.0
// Project: https://github.com/makeup-js/makeup-screenreader-trap#readme
// Definitions by: Timur Manyanov <https://github.com/darkwebdev>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
export function trap(el: HTMLElement): void;
export function untrap(): void;

View File

@@ -0,0 +1,9 @@
import { trap, untrap } from 'makeup-screenreader-trap';
const widgetEl: HTMLElement | null = document.querySelector('.expander');
if (widgetEl) {
trap(widgetEl);
}
untrap();

View File

@@ -0,0 +1,24 @@
{
"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",
"makeup-screenreader-trap-tests.ts"
]
}

View File

@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }