[react-axe] Initial set of typedefs (#34108)

* Add dts for react-axe

* Lint fixes

* Remove the v from the version header

* Set strictFunctionTypes to true per code review
This commit is contained in:
Akshay Karthik
2019-03-26 17:21:10 +01:00
committed by timolinn
parent 1c24ca23fc
commit 66d20973f3
5 changed files with 59 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
// Type definitions for react-axe 3.1
// Project: https://github.com/dequelabs/react-axe
// Definitions by: Akshay Karthik <https://github.com/akshaykarthik>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import * as React from "react";
import * as ReactDOM from "react-dom";
import { Spec } from "axe-core";
export = axe;
declare function axe(
react: typeof React,
reactDOM: typeof ReactDOM,
timeout: number,
config?: axe.ReactAxeConfig
): void;
declare namespace axe {
type ReactAxeConfig = Spec;
}
+6
View File
@@ -0,0 +1,6 @@
{
"private": true,
"dependencies": {
"axe-core": "3.2.2"
}
}
+5
View File
@@ -0,0 +1,5 @@
import * as React from "react";
import * as ReactDOM from "react-dom";
import * as axe from "react-axe";
axe(React, ReactDOM, 1000);
+25
View File
@@ -0,0 +1,25 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"jsx": "react"
},
"files": [
"index.d.ts",
"react-axe-tests.tsx"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }