Suggestion
π Search Terms
is declared but its value is never read tsdoc
is declared but its value is never read tsdoc @deprecated
β
Viability Checklist
My suggestion meets these guidelines:
β Suggestion
I sometimes use TSDoc to reference another type that isn't really being used in the file I'm working in. This is often in combination with the @deprecated documentation tag. My suggestion is to stop giving the compilation error that the import is not being used. I do realize it might be some complexity that I'm not aware of here, regarding looking at the contents of the TSDocs.
π Motivating Example
import myNotDeprecatedFunction from "./other-file.ts";
/**
* @deprecated Use {@link myNotDeprecatedFunction} instead.
*/
export const myDeprecatedFunction = () => {
console.log("Hello world");
};
As you can see, I import the other function, and this is to make sure that the link works when viewing TSDocs in VSCode (or any other IDE I'd assume). But TypeScript will complain about this import never being read. I would love to see this warning go away when I'm referencing it in a {@link}.
π» Use Cases
It simply improves my documentation without workarounds to get around the error
Other notes
I also added a similar issue for the TSLint project:
typescript-eslint/typescript-eslint#5017
Suggestion
π Search Terms
is declared but its value is never read tsdocis declared but its value is never read tsdoc @deprecatedβ Viability Checklist
My suggestion meets these guidelines:
β Suggestion
I sometimes use TSDoc to reference another type that isn't really being used in the file I'm working in. This is often in combination with the
@deprecateddocumentation tag. My suggestion is to stop giving the compilation error that the import is not being used. I do realize it might be some complexity that I'm not aware of here, regarding looking at the contents of the TSDocs.π Motivating Example
As you can see, I import the other function, and this is to make sure that the link works when viewing TSDocs in VSCode (or any other IDE I'd assume). But TypeScript will complain about this import never being read. I would love to see this warning go away when I'm referencing it in a
{@link}.π» Use Cases
It simply improves my documentation without workarounds to get around the error
Other notes
I also added a similar issue for the TSLint project:
typescript-eslint/typescript-eslint#5017