Skip to content

In TypeScript, Level is not assignable to AbstractLevel<Buffer, any, any> when constructing ManyLevelHost #12

Description

@6XGate
Argument of type 'Level<string, string>' is not assignable to parameter of type 'AbstractLevel<Buffer, any, any>' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
  Types of property 'batch' are incompatible.
    Type '{ (operations: (AbstractBatchPutOperation<Level<string, string>, string, string> | AbstractBatchDelOperation<Level<string, string>, string>)[]): Promise<...>; (operations: (AbstractBatchPutOperation<...> | AbstractBatchDelOperation<...>)[], callback: NodeCallback<...>): void; <K = string, V = string>(operations: (Ab...' is not assignable to type '{ (operations: AbstractBatchOperation<AbstractLevel<Buffer, any, any>, any, any>[]): Promise<void>; (operations: AbstractBatchOperation<AbstractLevel<Buffer, any, any>, any, any>[], callback: NodeCallback<...>): void; <K = any, V = any>(operations: AbstractBatchOperation<...>[], options: AbstractBatchOptions<...>): ...'.
      Types of parameters 'operations' and 'operations' are incompatible.
        Type 'AbstractBatchOperation<AbstractLevel<Buffer, any, any>, any, any>[]' is not assignable to type '(AbstractBatchPutOperation<Level<string, string>, string, string> | AbstractBatchDelOperation<Level<string, string>, string>)[]'.
          Type 'AbstractBatchOperation<AbstractLevel<Buffer, any, any>, any, any>' is not assignable to type 'AbstractBatchPutOperation<Level<string, string>, string, string> | AbstractBatchDelOperation<Level<string, string>, string>'.
            Type 'AbstractBatchPutOperation<AbstractLevel<Buffer, any, any>, any, any>' is not assignable to type 'AbstractBatchPutOperation<Level<string, string>, string, string> | AbstractBatchDelOperation<Level<string, string>, string>'.
              Type 'AbstractBatchPutOperation<AbstractLevel<Buffer, any, any>, any, any>' is not assignable to type 'AbstractBatchPutOperation<Level<string, string>, string, string>'.
                Types of property 'sublevel' are incompatible.
                  Type 'AbstractSublevel<AbstractLevel<Buffer, any, any>, any, any, any> | undefined' is not assignable to type 'AbstractSublevel<Level<string, string>, any, any, any> | undefined'.
                    Type 'AbstractSublevel<AbstractLevel<Buffer, any, any>, any, any, any>' is not assignable to type 'AbstractSublevel<Level<string, string>, any, any, any>' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
                      Types of property 'db' are incompatible.
                        Type 'AbstractLevel<Buffer, any, any>' is not assignable to type 'Level<string, string>' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.ts(2379)

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

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions