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

Duplicate type definitions in index.d.ts #15

Open
benmccann opened this issue Jul 8, 2023 · 0 comments · May be fixed by #16
Open

Duplicate type definitions in index.d.ts #15

benmccann opened this issue Jul 8, 2023 · 0 comments · May be fixed by #16

Comments

@benmccann
Copy link

benmccann commented Jul 8, 2023

The type definition file for this project looks a bit weird with the types duplicated and VS Code is complaining about having JSDoc @typedef in a .d.ts

/** @typedef { import('estree').Node} Node */
/** @typedef {Node | {
 *   type: 'PropertyDefinition';
 *   computed: boolean;
 *   value: Node
 * }} NodeWithPropertyDefinition */
/**
 *
 * @param {NodeWithPropertyDefinition} node
 * @param {NodeWithPropertyDefinition} parent
 * @returns {boolean}
 */
export default function is_reference(node: NodeWithPropertyDefinition, parent: NodeWithPropertyDefinition): boolean;
export type Node = import('estree').Node;
export type NodeWithPropertyDefinition = Node | {
    type: 'PropertyDefinition';
    computed: boolean;
    value: Node;
};

It would also be nice to add a description for is_reference to its JSDoc

It looks like the type definitions might be generated here:

"prepublishOnly": "npm test && tsc"

@benmccann benmccann linked a pull request Jul 8, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant