mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-06 13:11:46 +00:00
[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:
Vendored
+22
@@ -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;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"axe-core": "3.2.2"
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user