When using a, ES2015 class as a type in JSDoc it does not appear to work correctly in files that import that class via a require statement.
While working within the same file that the class was defined in, everything works as expected (shown below).
While working within a different file the class appears to import correctly and show its constructor typing (shown below).
But when I try to use the class for typing (As done in the first image) it no longer considers my class as a valid type.
Here is the jsconfig I was using for this example
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"allowSyntheticDefaultImports": true
}
}
Am I just missing something in my setup or is this the expected behavior?
This answer may be a bit late, but line 6 of your last image should read:
With a lower case "exampleType", since that's what the param is named in the function.