Skip to content
This repository was archived by the owner on Sep 11, 2026. It is now read-only.
This repository was archived by the owner on Sep 11, 2026. It is now read-only.

typedoc generation is broken #263

Description

@mcmire

As of 0a6e1bd, yarn build:docs now produces the following type errors:

node_modules/web3-core/lib/types/web3_config.d.ts:43:31 - error TS2420: Class 'Web3Config' incorrectly implements interface 'Web3ConfigOptions'.
  Types of property 'defaultAccount' are incompatible.
    Type 'string | undefined' is not assignable to type 'string'.
      Type 'undefined' is not assignable to type 'string'.

43 export declare abstract class Web3Config extends Web3EventEmitter<{
                                 ~~~~~~~~~~

node_modules/web3-errors/lib/types/errors/contract_errors.d.ts:91:5 - error TS2416: Property 'cause' in type 'Eip838ExecutionError' is not assignable to the same property in base type 'Web3ContractError'.
  Type 'Eip838ExecutionError | undefined' is not assignable to type 'Error | undefined'.
    Type 'Eip838ExecutionError' is not assignable to type 'Error' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
      Types of property 'stack' are incompatible.
        Type 'string | undefined' is not assignable to type 'string'.
          Type 'undefined' is not assignable to type 'string'.

91     cause: Eip838ExecutionError | undefined;
       ~~~~~

node_modules/web3-errors/lib/types/errors/contract_errors.d.ts:96:5 - error TS2416: Property 'toJSON' in type 'Eip838ExecutionError' is not assignable to the same property in base type 'Web3ContractError'.
  Type '() => { name: string; code: number; message: string; innerError: Eip838ExecutionError | undefined; cause: Eip838ExecutionError | undefined; data: string; errorName?: string; errorSignature?: string; errorArgs?: { [x: string]: unknown; }; }' is not assignable to type '() => { name: string; code: number; message: string; cause: Error | undefined; innerError: Error | undefined; }'.
    Call signature return types '{ name: string; code: number; message: string; innerError: Eip838ExecutionError | undefined; cause: Eip838ExecutionError | undefined; data: string; errorName?: string; errorSignature?: string; errorArgs?: { [x: string]: unknown; }; }' and '{ name: string; code: number; message: string; cause: Error | undefined; innerError: Error | undefined; }' are incompatible.
      The types of 'cause' are incompatible between these types.
        Type 'Eip838ExecutionError | undefined' is not assignable to type 'Error | undefined'.

96     toJSON(): {
       ~~~~~~

node_modules/web3-errors/lib/types/errors/contract_errors.d.ts:113:5 - error TS2416: Property 'cause' in type 'ContractExecutionError' is not assignable to the same property in base type 'Web3ContractError'.
  Type 'Eip838ExecutionError' is not assignable to type 'Error' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.

113     cause: Eip838ExecutionError;
        ~~~~~

node_modules/web3-errors/lib/types/web3_error_base.d.ts:5:31 - error TS2415: Class 'BaseWeb3Error' incorrectly extends base class 'Error'.
  Types of property 'stack' are incompatible.
    Type 'string | undefined' is not assignable to type 'string'.
      Type 'undefined' is not assignable to type 'string'.

5 export declare abstract class BaseWeb3Error extends Error implements Web3Error {
                                ~~~~~~~~~~~~~

node_modules/web3-errors/lib/types/web3_error_base.d.ts:5:31 - error TS2420: Class 'BaseWeb3Error' incorrectly implements interface 'Web3Error'.
  Types of property 'stack' are incompatible.
    Type 'string | undefined' is not assignable to type 'string'.
      Type 'undefined' is not assignable to type 'string'.

5 export declare abstract class BaseWeb3Error extends Error implements Web3Error {
                                ~~~~~~~~~~~~~

node_modules/web3-eth/lib/types/web3_subscriptions.d.ts:25:15 - error TS2416: Property 'formatSubscriptionResult' in type 'LogsSubscription' is not assignable to the same property in base type 'Web3Subscription<{ data: LogsOutput; }, { readonly fromBlock?: BlockNumberOrTag; readonly address?: string | string[]; readonly topics?: string[]; }, EthExecutionAPI, { data: LogsOutput; } & CommonSubscriptionEvents>'.
  Type '(data: LogsOutput) => { readonly id?: string | undefined; readonly removed: boolean; readonly logIndex?: string | number | bigint | undefined; readonly transactionIndex?: string | number | bigint | undefined; readonly transactionHash?: string | undefined; readonly blockHash?: string | undefined; readonly blockNumber?: string | number | bigint | undefined; readonly address: string; readonly topics: string[]; readonly data: string; }' is not assignable to type '(data: LogsOutput) => LogsOutput'.
    Call signature return types '{ readonly id?: string | undefined; readonly removed: boolean; readonly logIndex?: string | number | bigint | undefined; readonly transactionIndex?: string | number | bigint | undefined; readonly transactionHash?: string | undefined; readonly blockHash?: string | undefined; readonly blockNumber?: string | number | bigint | undefined; readonly address: string; readonly topics: string[]; readonly data: string; }' and 'LogsOutput' are incompatible.
      The types of 'id' are incompatible between these types.
        Type 'string | undefined' is not assignable to type 'string'.
          Type 'undefined' is not assignable to type 'string'.

25     protected formatSubscriptionResult(data: LogsOutput): {
                 ~~~~~~~~~~~~~~~~~~~~~~~~

Worth noting that yarn build does not produce any type errors. So typedoc must be doing something that ts-bridge is not doing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions