diff options
author | Fabio Berger <me@fabioberger.com> | 2018-03-07 17:20:15 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-03-07 17:20:15 +0800 |
commit | f66efed777f1046718478a28f5dd3c4942379774 (patch) | |
tree | 4215103a5fce52319fe110affe2b1fca3dfd9b35 /packages/react-docs/src/ts | |
parent | e88eba18772015b07c9ae305260c12f1cdf69e8c (diff) | |
download | dexon-sol-tools-f66efed777f1046718478a28f5dd3c4942379774.tar dexon-sol-tools-f66efed777f1046718478a28f5dd3c4942379774.tar.gz dexon-sol-tools-f66efed777f1046718478a28f5dd3c4942379774.tar.bz2 dexon-sol-tools-f66efed777f1046718478a28f5dd3c4942379774.tar.lz dexon-sol-tools-f66efed777f1046718478a28f5dd3c4942379774.tar.xz dexon-sol-tools-f66efed777f1046718478a28f5dd3c4942379774.tar.zst dexon-sol-tools-f66efed777f1046718478a28f5dd3c4942379774.zip |
Add example docs to react-docs package
Diffstat (limited to 'packages/react-docs/src/ts')
4 files changed, 1473 insertions, 31 deletions
diff --git a/packages/react-docs/src/ts/components/documentation.tsx b/packages/react-docs/src/ts/components/documentation.tsx index 8be7cd62d..8db9b34b4 100644 --- a/packages/react-docs/src/ts/components/documentation.tsx +++ b/packages/react-docs/src/ts/components/documentation.tsx @@ -37,8 +37,6 @@ import { SourceLink } from './source_link'; import { Type } from './type'; import { TypeDefinition } from './type_definition'; -const TOP_BAR_HEIGHT = 60; - const networkNameToColor: { [network: string]: string } = { [Networks.Kovan]: colors.purple, [Networks.Ropsten]: colors.red, @@ -53,30 +51,15 @@ export interface DocumentationProps { docAgnosticFormat?: DocAgnosticFormat; sidebarHeader?: React.ReactNode; sourceUrl: string; + topBarHeight?: number; } export interface DocumentationState {} -const styles: Styles = { - mainContainers: { - position: 'absolute', - top: 1, - left: 0, - bottom: 0, - right: 0, - overflowZ: 'hidden', - overflowY: 'scroll', - minHeight: `calc(100vh - ${TOP_BAR_HEIGHT}px)`, - WebkitOverflowScrolling: 'touch', - }, - menuContainer: { - borderColor: colors.grey300, - maxWidth: 330, - marginLeft: 20, - }, -}; - export class Documentation extends React.Component<DocumentationProps, DocumentationState> { + public static defaultProps: Partial<DocumentationProps> = { + topBarHeight: 0, + }; public componentDidUpdate(prevProps: DocumentationProps, prevState: DocumentationState) { if (!_.isEqual(prevProps.docAgnosticFormat, this.props.docAgnosticFormat)) { const hash = window.location.hash.slice(1); @@ -84,27 +67,45 @@ export class Documentation extends React.Component<DocumentationProps, Documenta } } public render() { + const styles: Styles = { + mainContainers: { + position: 'absolute', + top: 1, + left: 0, + bottom: 0, + right: 0, + overflowZ: 'hidden', + overflowY: 'scroll', + minHeight: `calc(100vh - ${this.props.topBarHeight}px)`, + WebkitOverflowScrolling: 'touch', + }, + menuContainer: { + borderColor: colors.grey300, + maxWidth: 330, + marginLeft: 20, + }, + }; const menuSubsectionsBySection = this.props.docsInfo.getMenuSubsectionsBySection(this.props.docAgnosticFormat); return ( <div> {_.isUndefined(this.props.docAgnosticFormat) ? ( - this._renderLoading() + this._renderLoading(styles.mainContainers) ) : ( <div style={{ width: '100%', height: '100%', backgroundColor: colors.gray40 }}> <div className="mx-auto max-width-4 flex" - style={{ color: colors.grey800, height: `calc(100vh - ${TOP_BAR_HEIGHT}px)` }} + style={{ color: colors.grey800, height: `calc(100vh - ${this.props.topBarHeight}px)` }} > <div className="relative sm-hide xs-hide" - style={{ width: '36%', height: `calc(100vh - ${TOP_BAR_HEIGHT}px)` }} + style={{ width: '36%', height: `calc(100vh - ${this.props.topBarHeight}px)` }} > <div className="border-right absolute" style={{ ...styles.menuContainer, ...styles.mainContainers, - height: `calc(100vh - ${TOP_BAR_HEIGHT}px)`, + height: `calc(100vh - ${this.props.topBarHeight}px)`, }} > <NestedSidebarMenu @@ -135,9 +136,9 @@ export class Documentation extends React.Component<DocumentationProps, Documenta </div> ); } - private _renderLoading() { + private _renderLoading(mainContainersStyles: React.CSSProperties) { return ( - <div className="col col-12" style={styles.mainContainers}> + <div className="col col-12" style={mainContainersStyles}> <div className="relative sm-px2 sm-pt2 sm-m1" style={{ height: 122, top: '50%', transform: 'translateY(-50%)' }} @@ -210,6 +211,9 @@ export class Documentation extends React.Component<DocumentationProps, Documenta /> ); }); + const headerStyle: React.CSSProperties = { + fontWeight: 100, + }; return ( <div key={`section-${sectionName}`} className="py2 pr3 md-pl2 sm-pl3"> <div className="flex pb2"> @@ -222,26 +226,26 @@ export class Documentation extends React.Component<DocumentationProps, Documenta {docSection.constructors.length > 0 && this.props.docsInfo.isVisibleConstructor(sectionName) && ( <div> - <h2 className="thin">Constructor</h2> + <h2 style={headerStyle}>Constructor</h2> {this._renderConstructors(docSection.constructors, sectionName, typeDefinitionByName)} </div> )} {docSection.properties.length > 0 && ( <div> - <h2 className="thin">Properties</h2> + <h2 style={headerStyle}>Properties</h2> <div>{propertyDefs}</div> </div> )} {docSection.methods.length > 0 && ( <div> - <h2 className="thin">Methods</h2> + <h2 style={headerStyle}>Methods</h2> <div>{methodDefs}</div> </div> )} {!_.isUndefined(docSection.events) && docSection.events.length > 0 && ( <div> - <h2 className="thin">Events</h2> + <h2 style={headerStyle}>Events</h2> <div>{eventDefs}</div> </div> )} diff --git a/packages/react-docs/src/ts/example/index.tsx b/packages/react-docs/src/ts/example/index.tsx new file mode 100644 index 000000000..7a0eab882 --- /dev/null +++ b/packages/react-docs/src/ts/example/index.tsx @@ -0,0 +1,67 @@ +import 'basscss/css/basscss.css'; +import 'less/all.less'; +import { MuiThemeProvider } from 'material-ui/styles'; +import * as React from 'react'; +import { render } from 'react-dom'; +import * as injectTapEventPlugin from 'react-tap-event-plugin'; + +import { Documentation } from '../components/documentation'; +import { DocsInfo } from '../docs_info'; +import { DocsInfoConfig, SupportedDocJson } from '../types'; +injectTapEventPlugin(); + +/* tslint:disable:no-var-requires */ +const IntroMarkdown = require('md/introduction'); +/* tslint:enable:no-var-requires */ + +const docSections = { + introduction: 'introduction', + web3Wrapper: 'web3Wrapper', +}; + +const docsInfoConfig: DocsInfoConfig = { + id: 'web3Wrapper', + type: SupportedDocJson.TypeDoc, + displayName: 'Web3 Wrapper', + packageUrl: 'https://github.com/0xProject/0x-monorepo', + menu: { + introduction: [docSections.introduction], + web3Wrapper: [docSections.web3Wrapper], + }, + sectionNameToMarkdown: { + [docSections.introduction]: IntroMarkdown, + }, + // Note: This needs to be kept in sync with the types exported in index.ts. Unfortunately there is + // currently no way to extract the re-exported types from index.ts via TypeDoc :( + publicTypes: ['TxData', 'TransactionReceipt', 'RawLogEntry'], + sectionNameToModulePath: { + [docSections.web3Wrapper]: ['"index"'], + }, + menuSubsectionToVersionWhenIntroduced: {}, + sections: docSections, + visibleConstructors: [docSections.web3Wrapper], +}; +const docsInfo = new DocsInfo(docsInfoConfig); + +const selectedVersion = '0.2.0'; +const availableVersions = ['0.1.12', '0.1.13', '0.1.14', '0.2.0']; + +const sourceUrl = `${ + docsInfoConfig.packageUrl +}/blob/@0xproject/web3-wrapper%40${selectedVersion}/packages/web3-wrapper`; + +import * as typeDocJson from './json/web3_wrapper_typedoc_output.json'; +const docAgnosticFormat = docsInfo.convertToDocAgnosticFormat(typeDocJson); + +render( + <MuiThemeProvider> + <Documentation + selectedVersion={selectedVersion} + availableVersions={availableVersions} + docsInfo={docsInfo} + docAgnosticFormat={docAgnosticFormat} + sourceUrl={sourceUrl} + /> + </MuiThemeProvider>, + document.getElementById('app'), +); diff --git a/packages/react-docs/src/ts/example/json/web3_wrapper_typedoc_output.json b/packages/react-docs/src/ts/example/json/web3_wrapper_typedoc_output.json new file mode 100644 index 000000000..b2e01f614 --- /dev/null +++ b/packages/react-docs/src/ts/example/json/web3_wrapper_typedoc_output.json @@ -0,0 +1,1364 @@ +{ + "id": 0, + "name": "@0xproject/web3-wrapper", + "kind": 0, + "flags": {}, + "children": [ + { + "id": 1, + "name": "\"index\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "/Users/fabioberger/Documents/projects/0x_project/0x-monorepo/packages/web3-wrapper/src/index.ts", + "children": [ + { + "id": 11, + "name": "Web3Wrapper", + "kind": 128, + "kindString": "Class", + "flags": { + "isExported": true + }, + "children": [ + { + "id": 12, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": { + "isExported": true + }, + "signatures": [ + { + "id": 13, + "name": "new Web3Wrapper", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "parameters": [ + { + "id": 14, + "name": "provider", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Provider" + } + }, + { + "id": 15, + "name": "defaults", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "name": "Partial", + "typeArguments": [ + { + "type": "reference", + "name": "TxData" + } + ] + } + } + ], + "type": { + "type": "reference", + "name": "Web3Wrapper", + "id": 11 + } + } + ], + "sources": [ + { + "fileName": "index.ts", + "line": 20, + "character": 38 + } + ] + }, + { + "id": 68, + "name": "callAsync", + "kind": 2048, + "kindString": "Method", + "flags": { + "isExported": true, + "isPublic": true + }, + "signatures": [ + { + "id": 69, + "name": "callAsync", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 70, + "name": "callData", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "CallData" + } + }, + { + "id": 71, + "name": "defaultBlock", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "name": "Web3.BlockParam" + } + } + ], + "type": { + "type": "reference", + "name": "Promise", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + } + ] + } + } + ], + "sources": [ + { + "fileName": "index.ts", + "line": 135, + "character": 26 + } + ] + }, + { + "id": 42, + "name": "doesContractExistAtAddressAsync", + "kind": 2048, + "kindString": "Method", + "flags": { + "isExported": true, + "isPublic": true + }, + "signatures": [ + { + "id": 43, + "name": "doesContractExistAtAddressAsync", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 44, + "name": "address", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "name": "Promise", + "typeArguments": [ + { + "type": "intrinsic", + "name": "boolean" + } + ] + } + } + ], + "sources": [ + { + "fileName": "index.ts", + "line": 76, + "character": 48 + } + ] + }, + { + "id": 65, + "name": "estimateGasAsync", + "kind": 2048, + "kindString": "Method", + "flags": { + "isExported": true, + "isPublic": true + }, + "signatures": [ + { + "id": 66, + "name": "estimateGasAsync", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 67, + "name": "txData", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Partial", + "typeArguments": [ + { + "type": "reference", + "name": "TxData" + } + ] + } + } + ], + "type": { + "type": "reference", + "name": "Promise", + "typeArguments": [ + { + "type": "intrinsic", + "name": "number" + } + ] + } + } + ], + "sources": [ + { + "fileName": "index.ts", + "line": 131, + "character": 33 + } + ] + }, + { + "id": 57, + "name": "getAvailableAddressesAsync", + "kind": 2048, + "kindString": "Method", + "flags": { + "isExported": true, + "isPublic": true + }, + "signatures": [ + { + "id": 58, + "name": "getAvailableAddressesAsync", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "reference", + "name": "Promise", + "typeArguments": [ + { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "string" + } + } + ] + } + } + ], + "sources": [ + { + "fileName": "index.ts", + "line": 98, + "character": 43 + } + ] + }, + { + "id": 39, + "name": "getBalanceInWeiAsync", + "kind": 2048, + "kindString": "Method", + "flags": { + "isExported": true, + "isPublic": true + }, + "signatures": [ + { + "id": 40, + "name": "getBalanceInWeiAsync", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 41, + "name": "owner", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "name": "Promise", + "typeArguments": [ + { + "type": "reference", + "name": "BigNumber" + } + ] + } + } + ], + "sources": [ + { + "fileName": "index.ts", + "line": 70, + "character": 37 + } + ] + }, + { + "id": 51, + "name": "getBlockAsync", + "kind": 2048, + "kindString": "Method", + "flags": { + "isExported": true, + "isPublic": true + }, + "signatures": [ + { + "id": 52, + "name": "getBlockAsync", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 53, + "name": "blockParam", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "reference", + "name": "Web3.BlockParam" + } + ] + } + } + ], + "type": { + "type": "reference", + "name": "Promise", + "typeArguments": [ + { + "type": "reference", + "name": "BlockWithoutTransactionData" + } + ] + } + } + ], + "sources": [ + { + "fileName": "index.ts", + "line": 90, + "character": 30 + } + ] + }, + { + "id": 49, + "name": "getBlockNumberAsync", + "kind": 2048, + "kindString": "Method", + "flags": { + "isExported": true, + "isPublic": true + }, + "signatures": [ + { + "id": 50, + "name": "getBlockNumberAsync", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "reference", + "name": "Promise", + "typeArguments": [ + { + "type": "intrinsic", + "name": "number" + } + ] + } + } + ], + "sources": [ + { + "fileName": "index.ts", + "line": 86, + "character": 36 + } + ] + }, + { + "id": 54, + "name": "getBlockTimestampAsync", + "kind": 2048, + "kindString": "Method", + "flags": { + "isExported": true, + "isPublic": true + }, + "signatures": [ + { + "id": 55, + "name": "getBlockTimestampAsync", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 56, + "name": "blockParam", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "reference", + "name": "Web3.BlockParam" + } + ] + } + } + ], + "type": { + "type": "reference", + "name": "Promise", + "typeArguments": [ + { + "type": "intrinsic", + "name": "number" + } + ] + } + } + ], + "sources": [ + { + "fileName": "index.ts", + "line": 94, + "character": 39 + } + ] + }, + { + "id": 16, + "name": "getContractDefaults", + "kind": 2048, + "kindString": "Method", + "flags": { + "isExported": true, + "isPublic": true + }, + "signatures": [ + { + "id": 17, + "name": "getContractDefaults", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "reference", + "name": "Partial", + "typeArguments": [ + { + "type": "reference", + "name": "TxData" + } + ] + } + } + ], + "sources": [ + { + "fileName": "index.ts", + "line": 33, + "character": 30 + } + ] + }, + { + "id": 62, + "name": "getContractFromAbi", + "kind": 2048, + "kindString": "Method", + "flags": { + "isExported": true, + "isPublic": true + }, + "signatures": [ + { + "id": 63, + "name": "getContractFromAbi", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 64, + "name": "abi", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Web3.ContractAbi" + } + } + ], + "type": { + "type": "reference", + "name": "Contract", + "typeArguments": [ + { + "type": "intrinsic", + "name": "any" + } + ] + } + } + ], + "sources": [ + { + "fileName": "index.ts", + "line": 127, + "character": 29 + } + ] + }, + { + "id": 34, + "name": "getCurrentProvider", + "kind": 2048, + "kindString": "Method", + "flags": { + "isExported": true, + "isPublic": true + }, + "signatures": [ + { + "id": 35, + "name": "getCurrentProvider", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "reference", + "name": "Provider" + } + } + ], + "sources": [ + { + "fileName": "index.ts", + "line": 63, + "character": 29 + } + ] + }, + { + "id": 59, + "name": "getLogsAsync", + "kind": 2048, + "kindString": "Method", + "flags": { + "isExported": true, + "isPublic": true + }, + "signatures": [ + { + "id": 60, + "name": "getLogsAsync", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 61, + "name": "filter", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "FilterObject" + } + } + ], + "type": { + "type": "reference", + "name": "Promise", + "typeArguments": [ + { + "type": "array", + "elementType": { + "type": "reference", + "name": "LogEntry" + } + } + ] + } + } + ], + "sources": [ + { + "fileName": "index.ts", + "line": 103, + "character": 29 + } + ] + }, + { + "id": 29, + "name": "getNetworkIdAsync", + "kind": 2048, + "kindString": "Method", + "flags": { + "isExported": true, + "isPublic": true + }, + "signatures": [ + { + "id": 30, + "name": "getNetworkIdAsync", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "reference", + "name": "Promise", + "typeArguments": [ + { + "type": "intrinsic", + "name": "number" + } + ] + } + } + ], + "sources": [ + { + "fileName": "index.ts", + "line": 51, + "character": 34 + } + ] + }, + { + "id": 27, + "name": "getNodeVersionAsync", + "kind": 2048, + "kindString": "Method", + "flags": { + "isExported": true, + "isPublic": true + }, + "signatures": [ + { + "id": 28, + "name": "getNodeVersionAsync", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "reference", + "name": "Promise", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + } + ] + } + } + ], + "sources": [ + { + "fileName": "index.ts", + "line": 47, + "character": 36 + } + ] + }, + { + "id": 31, + "name": "getTransactionReceiptAsync", + "kind": 2048, + "kindString": "Method", + "flags": { + "isExported": true, + "isPublic": true + }, + "signatures": [ + { + "id": 32, + "name": "getTransactionReceiptAsync", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 33, + "name": "txHash", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "name": "Promise", + "typeArguments": [ + { + "type": "reference", + "name": "TransactionReceipt" + } + ] + } + } + ], + "sources": [ + { + "fileName": "index.ts", + "line": 56, + "character": 43 + } + ] + }, + { + "id": 21, + "name": "isAddress", + "kind": 2048, + "kindString": "Method", + "flags": { + "isExported": true, + "isPublic": true + }, + "signatures": [ + { + "id": 22, + "name": "isAddress", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 23, + "name": "address", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ], + "sources": [ + { + "fileName": "index.ts", + "line": 39, + "character": 20 + } + ] + }, + { + "id": 24, + "name": "isSenderAddressAvailableAsync", + "kind": 2048, + "kindString": "Method", + "flags": { + "isExported": true, + "isPublic": true + }, + "signatures": [ + { + "id": 25, + "name": "isSenderAddressAvailableAsync", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 26, + "name": "senderAddress", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "name": "Promise", + "typeArguments": [ + { + "type": "intrinsic", + "name": "boolean" + } + ] + } + } + ], + "sources": [ + { + "fileName": "index.ts", + "line": 42, + "character": 46 + } + ] + }, + { + "id": 72, + "name": "sendTransactionAsync", + "kind": 2048, + "kindString": "Method", + "flags": { + "isExported": true, + "isPublic": true + }, + "signatures": [ + { + "id": 73, + "name": "sendTransactionAsync", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 74, + "name": "txData", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "TxData" + } + } + ], + "type": { + "type": "reference", + "name": "Promise", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + } + ] + } + } + ], + "sources": [ + { + "fileName": "index.ts", + "line": 139, + "character": 37 + } + ] + }, + { + "id": 18, + "name": "setProvider", + "kind": 2048, + "kindString": "Method", + "flags": { + "isExported": true, + "isPublic": true + }, + "signatures": [ + { + "id": 19, + "name": "setProvider", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 20, + "name": "provider", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Provider" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "index.ts", + "line": 36, + "character": 22 + } + ] + }, + { + "id": 45, + "name": "signTransactionAsync", + "kind": 2048, + "kindString": "Method", + "flags": { + "isExported": true, + "isPublic": true + }, + "signatures": [ + { + "id": 46, + "name": "signTransactionAsync", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 47, + "name": "address", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 48, + "name": "message", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "name": "Promise", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + } + ] + } + } + ], + "sources": [ + { + "fileName": "index.ts", + "line": 82, + "character": 37 + } + ] + }, + { + "id": 36, + "name": "toWei", + "kind": 2048, + "kindString": "Method", + "flags": { + "isExported": true, + "isPublic": true + }, + "signatures": [ + { + "id": 37, + "name": "toWei", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 38, + "name": "ethAmount", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "BigNumber" + } + } + ], + "type": { + "type": "reference", + "name": "BigNumber" + } + } + ], + "sources": [ + { + "fileName": "index.ts", + "line": 66, + "character": 16 + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 12 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 68, + 42, + 65, + 57, + 39, + 51, + 49, + 54, + 16, + 62, + 34, + 59, + 29, + 27, + 31, + 21, + 24, + 72, + 18, + 45, + 36 + ] + } + ], + "sources": [ + { + "fileName": "index.ts", + "line": 17, + "character": 24 + } + ] + }, + { + "id": 2, + "name": "RawLogEntry", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "children": [ + { + "id": 8, + "name": "address", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "index.ts", + "line": 12, + "character": 11 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 6, + "name": "blockHash", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "index.ts", + "line": 10, + "character": 13 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "null" + } + ] + } + }, + { + "id": 7, + "name": "blockNumber", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "index.ts", + "line": 11, + "character": 15 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "null" + } + ] + } + }, + { + "id": 9, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "index.ts", + "line": 13, + "character": 8 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 3, + "name": "logIndex", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "index.ts", + "line": 7, + "character": 12 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "null" + } + ] + } + }, + { + "id": 10, + "name": "topics", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "index.ts", + "line": 14, + "character": 10 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "string" + } + } + }, + { + "id": 5, + "name": "transactionHash", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "index.ts", + "line": 9, + "character": 19 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 4, + "name": "transactionIndex", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "index.ts", + "line": 8, + "character": 20 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "null" + } + ] + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 8, + 6, + 7, + 9, + 3, + 10, + 5, + 4 + ] + } + ], + "sources": [ + { + "fileName": "index.ts", + "line": 6, + "character": 21 + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 11 + ] + }, + { + "title": "Interfaces", + "kind": 256, + "children": [ + 2 + ] + } + ], + "sources": [ + { + "fileName": "index.ts", + "line": 1, + "character": 0 + } + ] + } + ], + "groups": [ + { + "title": "External modules", + "kind": 1, + "children": [ + 1 + ] + } + ] +}
\ No newline at end of file diff --git a/packages/react-docs/src/ts/globals.d.ts b/packages/react-docs/src/ts/globals.d.ts index 31c8a2c1f..c7cd53854 100644 --- a/packages/react-docs/src/ts/globals.d.ts +++ b/packages/react-docs/src/ts/globals.d.ts @@ -5,3 +5,10 @@ declare function compareVersions(firstVersion: string, secondVersion: string): n declare module 'compare-versions' { export = compareVersions; } + +declare module '*.json' { + const json: any; + /* tslint:disable */ + export default json; + /* tslint:enable */ +} |