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

Analyzing override jsdoc tag #218

Closed
2 tasks done
nnaydenow opened this issue Aug 15, 2023 · 2 comments
Closed
2 tasks done

Analyzing override jsdoc tag #218

nnaydenow opened this issue Aug 15, 2023 · 2 comments

Comments

@nnaydenow
Copy link

Checklist

  • Did you run the analyzer with the --dev flag to get more information?
  • Did you create a minimal reproduction in the playground?
node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

Error: 

[my-plugin]: Looks like you've hit an error in third party plugin: my-plugin. Please try to create a minimal reproduction and inform the author of the my-plugin plugin.

 TypeError: Cannot read properties of undefined (reading 'text')
    at TokenOrIdentifierObject.getText (/Users/I351230/work/ui5-webcomponents/node_modules/@custom-elements-manifest/analyzer/node_modules/typescript/lib/typescript.js:152835:31)

For some reason I'm not able to save the playground link but this is the code:

  • Code to analyze:
class TestClass {
	/**
	 * @override
	 */
	test() {
	}
}

TestClass.define();
  • Plugin code:
function myPlugin() {
  // Write a custom plugin
  return {
    // Make sure to always give your plugins a name, this helps when debugging
    name: 'my-plugin',
    // Runs for all modules in a project, before continuing to the analyzePhase
    collectPhase({ts, node, context}){},
    // Runs for each module
    analyzePhase({ts, node, moduleDoc, context}){
        if (node?.kind === ts?.SyntaxKind?.ClassDeclaration) {
			console.log(node?.members?.[0]?.jsDoc?.[0]?.tags?.[0]?.tagName?.getText?.()) // Expecting here to be override
        }
    },
    // Runs for each module, after analyzing, all information about your module should now be available
    moduleLinkPhase({moduleDoc, context}){},
    // Runs after modules have been parsed and after post-processing
    packageLinkPhase({customElementsManifest, context}){},
  }
}

Expected behavior
Analyzing the Override jsdoc tag to not throw error

@nnaydenow
Copy link
Author

Hi @thepassle,

I'm not sure if I have to tag you but I will try.

Do you have any progress with this issue? Is the project is still ongoing?

@thepassle
Copy link
Member

Unable to reproduce this in the playground, closing. Please feel free to reopen if you're still running into this issue with the latest version of the analyzer

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