Move remaining type configs to topLevel DocsInfoConfigs

This commit is contained in:
Fabio Berger
2018-03-07 15:19:59 +01:00
parent 8517de128b
commit 9aec1feae3
8 changed files with 176 additions and 115 deletions

View File

@@ -63,67 +63,6 @@ const docsInfoConfig: DocsInfoConfig = {
[zeroExJsDocSections.errors]: ErrorsMarkdown,
[zeroExJsDocSections.versioning]: versioningMarkdown,
},
// 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 :( Make sure to only
// ADD types here, DO NOT REMOVE types since they might still be needed for older supported versions
publicTypes: [
'Order',
'SignedOrder',
'ECSignature',
'ZeroExError',
'EventCallback',
'EventCallbackAsync',
'EventCallbackSync',
'ExchangeContractErrs',
'ContractEvent',
'Token',
'ExchangeEvents',
'IndexedFilterValues',
'SubscriptionOpts',
'BlockRange',
'BlockParam',
'OrderFillOrKillRequest',
'OrderCancellationRequest',
'OrderFillRequest',
'ContractEventEmitter',
'Web3Provider',
'ContractEventArgs',
'LogCancelArgs',
'LogFillArgs',
'LogErrorContractEventArgs',
'LogFillContractEventArgs',
'LogCancelContractEventArgs',
'EtherTokenContractEventArgs',
'WithdrawalContractEventArgs',
'DepositContractEventArgs',
'TokenEvents',
'ExchangeContractEventArgs',
'TransferContractEventArgs',
'ApprovalContractEventArgs',
'TokenContractEventArgs',
'ZeroExConfig',
'TransactionReceipt',
'TransactionReceiptWithDecodedLogs',
'LogWithDecodedArgs',
'EtherTokenEvents',
'BlockParamLiteral',
'DecodedLogArgs',
'MethodOpts',
'ValidateOrderFillableOpts',
'OrderTransactionOpts',
'TransactionOpts',
'ContractEventArg',
'LogEvent',
'LogEntry',
'DecodedLogEvent',
'EventWatcherCallback',
'OnOrderStateChangeCallback',
'OrderStateValid',
'OrderStateInvalid',
'OrderState',
'OrderStateWatcherConfig',
'FilterObject',
],
sectionNameToModulePath: {
[zeroExJsDocSections.zeroEx]: ['"0x.js/src/0x"', '"src/0x"'],
[zeroExJsDocSections.exchange]: [
@@ -160,6 +99,91 @@ const docsInfoConfig: DocsInfoConfig = {
},
sections: zeroExJsDocSections,
visibleConstructors: [zeroExJsDocSections.zeroEx],
typeConfigs: {
// 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 :( Make sure to only
// ADD types here, DO NOT REMOVE types since they might still be needed for older supported versions
publicTypes: [
'Order',
'SignedOrder',
'ECSignature',
'ZeroExError',
'EventCallback',
'EventCallbackAsync',
'EventCallbackSync',
'ExchangeContractErrs',
'ContractEvent',
'Token',
'ExchangeEvents',
'IndexedFilterValues',
'SubscriptionOpts',
'BlockRange',
'BlockParam',
'OrderFillOrKillRequest',
'OrderCancellationRequest',
'OrderFillRequest',
'ContractEventEmitter',
'Web3Provider',
'ContractEventArgs',
'LogCancelArgs',
'LogFillArgs',
'LogErrorContractEventArgs',
'LogFillContractEventArgs',
'LogCancelContractEventArgs',
'EtherTokenContractEventArgs',
'WithdrawalContractEventArgs',
'DepositContractEventArgs',
'TokenEvents',
'ExchangeContractEventArgs',
'TransferContractEventArgs',
'ApprovalContractEventArgs',
'TokenContractEventArgs',
'ZeroExConfig',
'TransactionReceipt',
'TransactionReceiptWithDecodedLogs',
'LogWithDecodedArgs',
'EtherTokenEvents',
'BlockParamLiteral',
'DecodedLogArgs',
'MethodOpts',
'ValidateOrderFillableOpts',
'OrderTransactionOpts',
'TransactionOpts',
'ContractEventArg',
'LogEvent',
'LogEntry',
'DecodedLogEvent',
'EventWatcherCallback',
'OnOrderStateChangeCallback',
'OrderStateValid',
'OrderStateInvalid',
'OrderState',
'OrderStateWatcherConfig',
'FilterObject',
],
typeNameToPrefix: {
Provider: 'Web3',
DecodedLogEntryEvent: 'Web3',
LogEntryEvent: 'Web3',
CallData: 'Web3',
},
typeNameToExternalLink: {
Web3: constants.URL_WEB3_DOCS,
Provider: constants.URL_WEB3_PROVIDER_DOCS,
BigNumber: constants.URL_BIGNUMBERJS_GITHUB,
DecodedLogEntryEvent: constants.URL_WEB3_DECODED_LOG_ENTRY_EVENT,
LogEntryEvent: constants.URL_WEB3_LOG_ENTRY_EVENT,
},
typeNameToDocSection: {
ExchangeWrapper: 'exchange',
TokenWrapper: 'token',
TokenRegistryWrapper: 'tokenRegistry',
EtherTokenWrapper: 'etherToken',
ProxyWrapper: 'proxy',
TokenTransferProxyWrapper: 'proxy',
OrderStateWatcher: 'orderWatcher',
},
},
};
const docsInfo = new DocsInfo(docsInfoConfig);