Skip to content

Bug: .args() Broken in .getAll with Compound Index #14

@ChrisTalman

Description

@ChrisTalman

I am receiving this error:

Argument of type '(string | RSpecial<"ARGS">)[]' is not assignable to parameter of type 'KeyType'. Type '(string | RSpecial<"ARGS">)[]' is not assignable to type 'RSpecial<"ARGS">'. Property 'type' is missing in type '(string | RSpecial<"ARGS">)[]'.

It's produced by code which looks similar to the following:

import r from 'rethinkdb';

const array =
[
	'abc',
	'def',
	'hij'
];
const string = 'klm';

r
	.table('name')
	.getAll
	(
		[
			r.args(array),
			string
		],
		{
			index: 'key1_key2'
		}
	)

The compiled code runs correctly without error from the RethinkDB library.

The problem seems to be with r.args in the context of a compound index in a getAll query.

I attempted to look through rethinkdb.d.ts to find the cause of the issue, but have been unsuccessful so far.

If anyone can lend a hand in resolving this, that'd be much appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions