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

bug: jsdoc entries not on the exported type #219

Open
gillyspy opened this issue Sep 11, 2022 · 1 comment
Open

bug: jsdoc entries not on the exported type #219

gillyspy opened this issue Sep 11, 2022 · 1 comment

Comments

@gillyspy
Copy link

sometimes the jsdoc entries are on the interface and not on the type and this cause inconsistent results.

e.g.

problem

/**
 * @description Deletes query by id
 * @throws {SuiteScriptError} MISSING_REQD_ARGUMENT if options or query are undefined
 * @throws {SuiteScriptError} WRONG_PARAMETER_TYPE if options isn't object or id isn't number
 * @throws {SuiteScriptError} UNABLE_TO_DELETE_QUERY if query doesn't exist or no permissions to delete it
 * @returns {ResultsSet}
 */
interface RunSuiteQL {
    (options: RunSuiteQLOptions): ResultSet;
    promise: (options: RunSuiteQLOptions) => Promise<ResultSet>;
}

export const runSuiteQL: RunSuiteQL;

should be

interface RunSuiteQL {
    (options: RunSuiteQLOptions): ResultSet;
    promise: (options: RunSuiteQLOptions) => Promise<ResultSet>;
}

/**
 * @description Deletes query by id
 * @throws {SuiteScriptError} MISSING_REQD_ARGUMENT if options or query are undefined
 * @throws {SuiteScriptError} WRONG_PARAMETER_TYPE if options isn't object or id isn't number
 * @throws {SuiteScriptError} UNABLE_TO_DELETE_QUERY if query doesn't exist or no permissions to delete it
 * @returns {ResultsSet}
 */
export const runSuiteQL: RunSuiteQL;
@MrRob
Copy link
Collaborator

MrRob commented Sep 21, 2022

Thank you for reporting this! I have fixed a few instances of this in the N/query module, to be included in the next version of this module. Have you spotted any other modules where this happened?

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

2 participants