Add type definitions for react-router-param-link. (#25004)

* Add type definitions for react-router-param-link.

* Declare TypeScript version.
This commit is contained in:
Mtsg
2018-04-16 15:51:24 -07:00
committed by Ryan Cavanaugh
parent 600f681913
commit 521725e9ab
4 changed files with 43 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
// Type definitions for react-router-param-link 1.0
// Project: https://github.com/mtsg/react-router-param-link
// Definitions by: Motosugi Murata <https://github.com/mtsg>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
import * as React from "react";
import { LinkProps } from "react-router-dom";
export class ParamLink extends React.Component<LinkProps, any> { }
@@ -0,0 +1,5 @@
import * as React from "react";
import { ParamLink } from "react-router-param-link";
<ParamLink to={"path"} />;
<ParamLink to={"path/:param"} />;
@@ -0,0 +1,25 @@
{
"compilerOptions": {
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"jsx": "react",
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitAny": true,
"noImplicitThis": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true
},
"files": [
"index.d.ts",
"react-router-param-link-tests.tsx"
]
}
@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}