types for react
This commit is contained in:
parent
433300aa62
commit
75cd97ebe9
|
@ -24,6 +24,7 @@
|
||||||
"url": "https://github.com/embarklabs/subspace/issues"
|
"url": "https://github.com/embarklabs/subspace/issues"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"types": "types/index.d.ts",
|
||||||
"main": "./lib/index.js",
|
"main": "./lib/index.js",
|
||||||
"module": "./module/index.js",
|
"module": "./module/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
import Web3 from "web3";
|
||||||
|
import React from 'react';
|
||||||
|
import Subspace from "@embarklabs/subspace"
|
||||||
|
|
||||||
|
export interface SubspaceProviderProps {
|
||||||
|
web3: Web3;
|
||||||
|
children: React.ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const SubspaceProvider: React.Component<SubspaceProviderProps>;
|
||||||
|
|
||||||
|
export class observe extends React.Component<P> {}
|
||||||
|
|
||||||
|
export default function useSubspace(): Subspace;
|
||||||
|
|
||||||
|
interface withSubspaceProps {
|
||||||
|
subspace: Subspace;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class withSubspace extends React.Component<P & withSubspace> {
|
||||||
|
constructor(WrappedComponent: ReactNode);
|
||||||
|
}
|
Loading…
Reference in New Issue