Skip to content

Generate constructors for data only interfaces  #7

@stheophil

Description

@stheophil

Currently, in order to generate an object of type

interface getSummaryDataOptions {
        /** Do not use aliases specified in the data source in Tableau. Default is false. */
        ignoreAliases?: boolean;
        /** Only return data for the currently selected marks. Default is false. */
        ignoreSelection?: boolean;
        /** The number of rows of data that you want to return. Enter 0 to return all rows. */
        maxRows: number;
    }

I implement a function in Javascript like

function MakeSummaryDataOptions(a, b, c) {
  return {
    ignoreAliases: a,
    ignoreSelection: b,
    maxRows: c
  };
}

plus an interface definition in typescript. It would be nice if tcjs supplied constructor functions for such objects.

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