Skip to content

Index.getIndexString parameter definition missed in v0.9.0 #291

Open
@mjkangquarry

Description

@mjkangquarry

"Expected 0 arguments, but got 2." error occur when I try to run a sample in TSX as follows.

    const requestsSeries = new TimeSeries({
      name: 'requests',
      columns: ['time', 'requests'],
      points: requests.map(([d, value]) => [Index.getIndexString('1h', new Date(d)), value]),,
    })

I found current definition is different with real function parameter.

Current wrong definition:
pond/src/index.d.ts

        static getIndexString(): string;

Real function parameter:
pond/src/pond/lib/index.js

    static getIndexString(win, date) {

Please revise it as follows:

         static getIndexString(win: string, date: Date): string;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions