mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 23:07:06 +00:00
Feature/react d3 graph (#41953)
* react-d3-graph types This is our first time submitting something to this git repo. This is the type definition for the node module 'react-d3-graph'. * Test added * tests fixed * Update package.json * Update react-d3-graph-tests.tsx * Update package.json * Delete package.json * Create tslint.json * Update index.d.ts * Update react-d3-graph-tests.tsx * Update package.json
This commit is contained in:
Vendored
+32
@@ -0,0 +1,32 @@
|
||||
// Type definitions for react-d3-graph 2.3
|
||||
// Project: https://github.com/danielcaldas/react-d3-graph#readme
|
||||
// Definitions by: hrngoode <https://github.com/me>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import { Component } from "react";
|
||||
|
||||
export class Graph extends Component<any, any> {
|
||||
constructor(props: any, ...args: any[]);
|
||||
|
||||
UNSAFE_componentWillReceiveProps(nextProps: any): any;
|
||||
|
||||
componentDidMount(): void;
|
||||
|
||||
componentDidUpdate(): void;
|
||||
|
||||
componentWillUnmount(): void;
|
||||
|
||||
render(): any;
|
||||
}
|
||||
|
||||
export class Link extends Component<any, any> {
|
||||
constructor(...args: any[]);
|
||||
|
||||
render(): any;
|
||||
}
|
||||
|
||||
export class Node extends Component<any, any> {
|
||||
constructor(...args: any[]);
|
||||
|
||||
render(): any;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import { Graph, Link, Node } from "react-d3-graph";
|
||||
import * as React from 'react';
|
||||
|
||||
export class Example extends React.Component {
|
||||
render(): React.ReactElement {
|
||||
return (
|
||||
<div>
|
||||
<Graph id="test"/>
|
||||
<Link/>
|
||||
<Node/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"jsx": "react"
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"react-d3-graph-tests.tsx"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user