-
Hello! I have this example, I uploaded it also to Stackblitz: https://stackblitz.com/edit/sb1-a2gvdqm6 /**
* The optional options object.
*/
export type UseExampleOptions = {
/**
* foobar
*/
onCancel?: () => void;
/**
* foobar 2
*/
throwOnCancel?: boolean;
};
type UseExampleResult = string;
/**
* Some description
*/
type UseExample = <Options extends UseExampleOptions>(
options?: Options
) => UseExampleResult;
/**
* Some description
*
* @returns Return description
*
* @example
* ### foobar
*
* Some description
*
* ```tsx {{ filename: 'src/components/MyButton.tsx' }}
* // Foobar
* ```
*/
export const useExample: UseExample = (options) => {
const optionStuff = options;
console.log(optionStuff);
return 'hello world';
}; I want to inline the Do I need a custom plugin for that? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
What does it even mean to inline a type parameter? By definition, that type could be any number of types that isn't known at the declaration site, only when calling the function. You could put the inline tag on |
Beta Was this translation helpful? Give feedback.
-
Or similar like this?: |
Beta Was this translation helpful? Give feedback.
Ah, you're running an old version of TypeDoc from before
@inline
was supported In 0.27, this renders as:In 0.28, as your
useExample
variable explicitly specifies a type, and TypeDoc is more conservative about rewriting the types of your members, you have to specify@function
for it to render as a function. When doing that, it renders as: