TypeScript: DataCollection object|map types

Description

I don't believe the DataCollection APIs actually return Map (e.g, metadata.compression instanceof Map !== true). It would be surprising as an end user to get either an object or a Map.

The current types:

This was probably intended to be:

Additionally, these types could be augmented to include some of the common props: One small example:

Environment

None

Pull Requests

None

Activity

Show:
Jorge Bay Gondra
September 24, 2019, 5:23 PM

It depends on the encoding setting specified by the user: https://docs.datastax.com/en/developer/nodejs-driver/4.2/features/datatypes/collections/#ecma-script-map-and-set-support

In any case, it’s a good idea to use [option: string]: any.

Fixed

Assignee

Jorge Bay Gondra

Reporter

Gim Mahasintunan

Reviewer

None

Fix versions

Labels

Components

None

PM Priority

None

Reproduced in

None

Pull Request

None

Affects versions

Priority

Major