TypeDoc: How to link to internal / provided types like Array and Promise

190 views Asked by At

I can't figure out how to link / reference the provided TypeScript types, for example from TypeScript's own lib.es5.d.ts.

For example I have a stringSplice function that basically works the same as the native Array.prototype.splice function. Though I'd like to include a @link to it.

I tried lot's of combinations, but every time I just got a Failed to resolve link to xyz

/**
 * Works like {@link Array.prototype.splice}
 * Works like {@link Array.splice}
 * Works like {@link Array:splice}
 * Works like {@link Array::splice}
 * Works like {@link Array#splice}
 */
export const stringSplice =
  (str: string, start = 0, deleteCount?: number, replacement = "") => {
    start = start < 0 ? mod(start, str.length) : start;
    deleteCount =  Math.max(deleteCount ?? str.length - start, 0);
    return str.slice(0, start) + replacement + str.slice(start + deleteCount);
  };

It this possible at all? Or maybe I need a plugin?


EDIT: My TypeDoc config is kinda empty. It just includes support for monorepo

{
  "entryPointStrategy": "packages",
  "entryPoints": ["packages/*"],
  "out": "./docs",
  "plugin": ["typedoc-plugin-resolve-crossmodule-references"]
}
0

There are 0 answers