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

Generate constructors for data only interfaces #7

Open
stheophil opened this issue Jun 8, 2020 · 0 comments
Open

Generate constructors for data only interfaces #7

stheophil opened this issue Jun 8, 2020 · 0 comments

Comments

@stheophil
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant