aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-docs/src/types.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/react-docs/src/types.ts')
-rw-r--r--packages/react-docs/src/types.ts260
1 files changed, 1 insertions, 259 deletions
diff --git a/packages/react-docs/src/types.ts b/packages/react-docs/src/types.ts
index 29f5664f5..153448513 100644
--- a/packages/react-docs/src/types.ts
+++ b/packages/react-docs/src/types.ts
@@ -22,72 +22,6 @@ export interface SectionsMap {
[sectionName: string]: string;
}
-export interface TypeDocType {
- type: TypeDocTypes;
- value: string;
- name: string;
- types: TypeDocType[];
- typeArguments?: TypeDocType[];
- declaration: TypeDocNode;
- elementType?: TypeDocType;
- indexSignature?: TypeDocNode;
- elements?: TupleElement[];
-}
-
-export interface TupleElement {
- type: string;
- name: string;
-}
-
-export interface TypeDocFlags {
- isStatic?: boolean;
- isOptional?: boolean;
- isPublic?: boolean;
- isExported?: boolean;
-}
-
-export interface TypeDocGroup {
- title: string;
- children: number[];
-}
-
-export interface TypeDocNode {
- id?: number;
- name?: string;
- kind?: string;
- defaultValue?: string;
- kindString?: string;
- type?: TypeDocType;
- fileName?: string;
- line?: number;
- comment?: TypeDocNode;
- text?: string;
- shortText?: string;
- returns?: string;
- declaration: TypeDocNode;
- flags?: TypeDocFlags;
- indexSignature?: TypeDocNode;
- signatures?: TypeDocNode[];
- parameters?: TypeDocNode[];
- typeParameter?: TypeDocNode[];
- sources?: TypeDocNode[];
- children?: TypeDocNode[];
- groups?: TypeDocGroup[];
-}
-
-export enum TypeDocTypes {
- Intrinsic = 'intrinsic',
- Reference = 'reference',
- Array = 'array',
- StringLiteral = 'stringLiteral',
- Reflection = 'reflection',
- Union = 'union',
- TypeParameter = 'typeParameter',
- Intersection = 'intersection',
- Tuple = 'tuple',
- Unknown = 'unknown',
-}
-
// Exception: We don't make the values uppercase because these KindString's need to
// match up those returned by TypeDoc
export enum KindString {
@@ -103,141 +37,8 @@ export enum KindString {
Class = 'Class',
}
-export interface DocAgnosticFormat {
- [sectionName: string]: DocSection;
-}
-
-export interface DocSection {
- comment: string;
- constructors: Array<TypescriptMethod | SolidityMethod>;
- methods: Array<TypescriptMethod | SolidityMethod>;
- properties: Property[];
- types: CustomType[];
- functions: TypescriptFunction[];
- events?: Event[];
- externalExportToLink?: ExternalExportToLink;
-}
-
-export interface TypescriptMethod extends BaseMethod {
- source?: Source;
- isStatic?: boolean;
- typeParameter?: TypeParameter;
-}
-
-export interface TypescriptFunction extends BaseFunction {
- source?: Source;
- typeParameter?: TypeParameter;
- callPath: string;
-}
-
-export interface SolidityMethod extends BaseMethod {
- isConstant?: boolean;
- isPayable?: boolean;
-}
-
-export interface Source {
- fileName: string;
- line: number;
-}
-
-export interface Parameter {
- name: string;
- comment: string;
- isOptional: boolean;
- type: Type;
- defaultValue?: string;
-}
-
-export interface TypeParameter {
- name: string;
- type?: Type;
-}
-
-export interface Type {
- name: string;
- typeDocType: TypeDocTypes;
- value?: string;
- isExportedClassReference?: boolean;
- typeArguments?: Type[];
- elementType?: ElementType;
- types?: Type[];
- method?: TypescriptMethod;
- indexSignature?: IndexSignature;
- externalLink?: string;
- tupleElements?: Type[];
-}
-
-export interface ElementType {
- name: string;
- typeDocType: TypeDocTypes;
-}
-
-export interface IndexSignature {
- keyName: string;
- keyType: Type;
- valueName: string;
-}
-
-export interface CustomType {
- name: string;
- kindString: string;
- type?: Type;
- method?: TypescriptMethod;
- indexSignature?: IndexSignature;
- defaultValue?: string;
- comment?: string;
- children?: CustomTypeChild[];
-}
-
-export interface CustomTypeChild {
- name: string;
- type?: Type;
- defaultValue?: string;
-}
-
-export interface Event {
- name: string;
- eventArgs: EventArg[];
-}
-
-export interface EventArg {
- isIndexed: boolean;
- name: string;
- type: Type;
-}
-
-export interface Property {
- name: string;
- type: Type;
- source?: Source;
- comment?: string;
- callPath?: string;
-}
-
-export interface BaseMethod {
- isConstructor: boolean;
- name: string;
- returnComment?: string | undefined;
- callPath: string;
- parameters: Parameter[];
- returnType: Type;
- comment?: string;
-}
-
-export interface BaseFunction {
- name: string;
- returnComment?: string | undefined;
- parameters: Parameter[];
- returnType: Type;
- comment?: string;
-}
-
-export interface TypeDefinitionByName {
- [typeName: string]: CustomType;
-}
-
export enum SupportedDocJson {
- Doxity = 'DOXITY',
+ SolDoc = 'SOL_DOC',
TypeDoc = 'TYPEDOC',
}
@@ -249,40 +50,6 @@ export interface ContractsByVersionByNetworkId {
};
}
-export interface DoxityDocObj {
- [contractName: string]: DoxityContractObj;
-}
-
-export interface DoxityContractObj {
- title: string;
- fileName: string;
- name: string;
- abiDocs: DoxityAbiDoc[];
-}
-
-export interface DoxityAbiDoc {
- constant: boolean;
- inputs: DoxityInput[];
- name: string;
- outputs: DoxityOutput[];
- payable: boolean;
- type: string;
- details?: string;
- return?: string;
-}
-
-export interface DoxityOutput {
- name: string;
- type: string;
-}
-
-export interface DoxityInput {
- name: string;
- type: string;
- description: string;
- indexed?: boolean;
-}
-
export interface AddressByContractName {
[contractName: string]: string;
}
@@ -297,28 +64,3 @@ export enum AbiTypes {
Function = 'function',
Event = 'event',
}
-
-export interface ExportNameToTypedocNames {
- [exportName: string]: string[];
-}
-
-export interface ExternalTypeToLink {
- [externalTypeName: string]: string;
-}
-
-export interface ExternalExportToLink {
- [externalExport: string]: string;
-}
-
-export interface Metadata {
- exportPathToTypedocNames: ExportNameToTypedocNames;
- exportPathOrder: string[];
- externalTypeToLink: ExternalTypeToLink;
- externalExportToLink: ExternalExportToLink;
-}
-
-export interface GeneratedDocJson {
- version: string;
- metadata: Metadata;
- typedocJson: TypeDocNode;
-}