-
Notifications
You must be signed in to change notification settings - Fork 42
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
Listing properties on an object type does not work #23
Labels
Comments
Good catch, looks like this is broken right now! As a workaround you can create a type to use as the param type: /**
* @typedef {object} GitGraphOptions
* @property {string} [elementId = "gitGraph"] - Id of the canvas container
* @property {Template|string|Object} [template] - Template of the graph
* @property {string} [author = "Sergio Flores <saxo-guy@epic.com>"] - Default author for commits
* @property {string} [mode = (null|"compact")] - Display mode
* @property {HTMLElement} [canvas] - DOM canvas (ex: document.getElementById("id"))
* @property {string} [orientation = ("vertical-reverse"|"horizontal"|"horizontal-reverse")] - Graph orientation
* @property {boolean} [reverseArrow = false] - Make arrows point to ancestors if true
* @property {number} [initCommitOffsetX = 0] - Add custom offsetX to initial commit.
* @property {number} [initCommitOffsetY = 0] - Add custom offsetY to initial commit.
* @property {HTMLElement} [tooltipContainer = document.body] - HTML Element containing tooltips in compact mode.
*/
declare type GitGraphOptions = {
elementId: string;
template: any | string | any;
author: string;
mode: string;
canvas: any;
orientation: string;
reverseArrow: boolean;
initCommitOffsetX: number;
initCommitOffsetY: number;
tooltipContainer: any;
};
/**
* @param {GitGraphOptions} options - GitGraph options
*/
objParam(options: GitGraphOptions): void; I'll mark this as a bug and try to get it fixed this weekend. |
Thanks for your answer, but I think we have second issue => your example doesn't deal with optionnals properties ;) |
This now works in the latest. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I'm trying to generate types.d.ts for gitgraph.js
This is my problem:
My
options
is not correctly parsed, idealy I would like to export an interface ofGitGraphOptions
but I can't find any jsdoc notations for have the correct output…If anyone have a simple solution, I take it, otherwise it can be a real issue
Thank you!
The text was updated successfully, but these errors were encountered: