Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typing fixes #43

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6429,9 +6429,9 @@ declare namespace esb {
* Required for geo and numeric field. For date fields the default is `now`.
* Date math (for example `now-1h`) is supported for origin.
*
* @param {*} origin A valid origin value for the field type.
* @param {string} origin A valid origin value for the field type.
*/
origin(origin: object): this;
origin(origin: string): this;

/**
* Required for all types. Defines the distance from origin + offset at which
Expand All @@ -6440,25 +6440,25 @@ declare namespace esb {
* defined as a number+unit (`1h`, `10d`,…). Default unit is milliseconds.
* For numeric field: Any number.
*
* @param {*} scale A valid scale value for the field type.
* @param {string} scale A valid scale value for the field type.
*/
scale(scale: object): this;
scale(scale: string): this;

/**
* If an `offset` is defined, the decay function will only compute the decay function
* for documents with a distance greater that the defined offset. The default is `0`.
*
* @param {*} offset A valid offset value for the field type.
* @param {number} offset A valid offset value for the field type.
*/
offset(offset: object): this;
offset(offset: number): this;

/**
* The `decay` parameter defines how documents are scored at the distance given at `scale`.
* If no `decay` is defined, documents at the distance `scale` will be scored `0.5`.
*
* @param {*} decay A decay value as a double.
* @param {number} decay A decay value as a double.
*/
decay(decay: object): this;
decay(decay: number): this;
}

/**
Expand Down