Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
4a447b8
Drop functions from property tables; add JSDoc comments
alexisintech Apr 9, 2026
9100976
undo changes about removing functions from property tables
alexisintech Apr 9, 2026
ea3d2eb
Revert "undo changes about removing functions from property tables"
alexisintech Apr 9, 2026
0292f5f
only remove functions from property tables if output page listed in a…
alexisintech Apr 9, 2026
8b9b1d4
begin building extract-methods.mjs
alexisintech Apr 10, 2026
ac8f133
use custom-plugin in extract-methods for link replacements
alexisintech Apr 10, 2026
9139e27
catchall link replacements should never replace text in headings
alexisintech Apr 10, 2026
2978152
protectPipeDelimitedInlineCodeSpans; handle if members live on alias …
alexisintech Apr 10, 2026
adb43df
add client resource to link replacements
alexisintech Apr 10, 2026
a0a9731
refactor extract-methods to use existing plugins to create tables,etc
alexisintech Apr 10, 2026
c9129a4
type intersections should merge all type information into the generat…
alexisintech Apr 10, 2026
2d1ceec
objects get their own folders with <object>-properties file and <obje…
alexisintech Apr 10, 2026
6eedb5b
include typealias functions in the methods generation
alexisintech Apr 11, 2026
ac0f71d
add helpers for documenting union types in property tables
alexisintech Apr 14, 2026
acfba24
cleaning up comments
alexisintech Apr 14, 2026
67bfa0b
fix links
alexisintech Apr 14, 2026
064abe1
fix: handle union objects only for type declaration tables
alexisintech Apr 14, 2026
a6f2857
remove slugs from properties file/methods folder; do not flatten inli…
alexisintech Apr 15, 2026
6fef09a
docs review
SarahSoutoul Apr 15, 2026
c99e565
fix clerkui descriptions; fix handlegoogleonetapcallback link; add ap…
alexisintech Apr 16, 2026
1250e86
inline handleemaillinkverificationparams
alexisintech Apr 16, 2026
a70521c
refactor to combine all reference_object info into one object
alexisintech Apr 16, 2026
9680e81
fix session object addition; add generation logic for union literals
alexisintech Apr 16, 2026
3a7b36b
add back children in property tables if they're documented; handle Ch…
alexisintech Apr 18, 2026
4fdd354
do not flatten parent props if they link to a dedicated page
alexisintech Apr 18, 2026
6e3e360
remove jsdoc comment from constructor
alexisintech Apr 18, 2026
3657c38
remove update to current-user
alexisintech Apr 18, 2026
94d5eb1
Merge branch 'main' into aa/generate-object-docs
alexisintech May 4, 2026
63e195c
remove use of 'optional' in jscomments
alexisintech May 4, 2026
a49d4b4
fix tsconfig error
alexisintech May 4, 2026
ee8d16a
remove inline tag from getting generated in output
alexisintech May 4, 2026
3327641
add user object and comments; support generic instantiation + interse…
alexisintech May 4, 2026
d6fa55f
remove backticks from link replacements; add more link replacements
alexisintech May 4, 2026
b1a0766
omit experimental tag + text from output; add more jsdoc comments for…
alexisintech May 4, 2026
0e3cbd6
finish documenting user object
alexisintech May 5, 2026
196fba4
generate signinfutureresource; fix file-structure test
alexisintech May 6, 2026
a432b35
support new @propertyTableDoc tag; handle object properties that incl…
alexisintech May 6, 2026
5f6a6b7
fix mixed namespaces (all callable members plus @propertyTableDoc tag)
alexisintech May 6, 2026
809241d
refactor how we handle objects with only callable members; introduce …
alexisintech May 7, 2026
4347350
remove TODO from generated content
alexisintech May 7, 2026
86b3e8f
fix TODO handling; add some links to custom-plugin
alexisintech May 7, 2026
f0d62d0
Merge branch 'main' into aa/generate-object-docs
alexisintech May 8, 2026
833ccf9
Apply suggestion from @alexisintech
alexisintech May 8, 2026
b2350a6
comment clean up
alexisintech May 8, 2026
5cded2a
generate signupfutureresource
alexisintech May 8, 2026
adb9396
fix signupfields
alexisintech May 8, 2026
83de588
signupfutureresource updates
alexisintech May 8, 2026
a473d6c
param headings need to get wrapped in backticks
alexisintech May 8, 2026
4e51dce
generate organization docs
alexisintech May 8, 2026
5c23021
remove properties headings from generated files
alexisintech May 8, 2026
28ebf79
generate api-keys
alexisintech May 8, 2026
537a7f7
generate billing docs; fix file-structure-test
alexisintech May 8, 2026
f0826e1
retrieve --> get
alexisintech May 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .typedoc/__tests__/file-structure.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,29 @@ describe('Typedoc output', () => {

it('should only have these nested folders', async () => {
const folders = await scanDirectory('directory');
const nestedFolders = folders.filter(folder => !isTopLevelPath(folder));
const nestedFolders = folders.filter(folder => !isTopLevelPath(folder)).sort((a, b) => a.localeCompare(b));

expect(nestedFolders).toMatchInlineSnapshot(`
[
"react/legacy",
"shared/api-key-resource",
"shared/api-key-resource/methods",
"shared/billing-namespace",
"shared/billing-namespace/methods",
"shared/clerk",
"shared/clerk/methods",
"shared/client-resource",
"shared/client-resource/methods",
"shared/organization-resource",
"shared/organization-resource/methods",
"shared/session-resource",
"shared/session-resource/methods",
"shared/sign-in-future-resource",
"shared/sign-in-future-resource/methods",
"shared/sign-up-future-resource",
"shared/sign-up-future-resource/methods",
"shared/user-resource",
"shared/user-resource/methods",
]
`);
});
Expand Down
93 changes: 93 additions & 0 deletions .typedoc/comment-utils.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
// @ts-check
import { Comment } from 'typedoc';

const TODO_WORD = /\bTODO\b/i;

/**
* @param {import('typedoc').Comment | undefined} comment
*/
export function commentContainsTodo(comment) {
if (!comment) {
return false;
}
const chunks = [];
if (comment.summary?.length) {
chunks.push(Comment.combineDisplayParts(comment.summary));
}
for (const tag of comment.blockTags ?? []) {
if (tag.content?.length) {
chunks.push(Comment.combineDisplayParts(tag.content));
}
}
return chunks.some(text => TODO_WORD.test(text));
}

/**
* Truncate at the first word "TODO" (case-insensitive). Used when flattening display parts to a string.
*
* @param {string} text
*/
export function stripTextAfterTodo(text) {
if (!text) {
return '';
}
const m = TODO_WORD.exec(text);
if (!m) {
return text;
}
return text.slice(0, m.index).trimEnd();
}

/**
* Drop display parts from the first `TODO` onward; truncate the containing text part if `TODO` appears mid-string.
*
* @param {import('typedoc').CommentDisplayPart[] | undefined} parts
* @returns {import('typedoc').CommentDisplayPart[]}
*/
function stripTodoFromDisplayParts(parts) {
if (!parts?.length) {
return parts ?? [];
}
/** @type {import('typedoc').CommentDisplayPart[]} */
const out = [];
for (const p of parts) {
if (p.kind === 'text' && 'text' in p && typeof p.text === 'string') {
const match = TODO_WORD.exec(p.text);
if (match) {
const before = p.text.slice(0, match.index).trimEnd();
if (before.length) {
out.push(/** @type {import('typedoc').CommentDisplayPart} */ ({ kind: 'text', text: before }));
}
return out;
}
}
out.push(p);
}
return out;
}

/**
* Returns a clone with `TODO` and everything after it removed from the summary and from any block tag that contains `TODO`.
* Comments without `TODO` are returned unchanged (same reference). Undefined in, undefined out.
*
* @param {import('typedoc').Comment | undefined} comment
* @returns {import('typedoc').Comment | undefined}
*/
export function applyTodoStrippingToComment(comment) {
if (!comment) {
return undefined;
}
if (!commentContainsTodo(comment)) {
return comment;
}
const c = comment.clone();
if (c.summary?.length && TODO_WORD.test(Comment.combineDisplayParts(c.summary))) {
c.summary = stripTodoFromDisplayParts(c.summary);
}
for (const tag of c.blockTags ?? []) {
if (tag.content?.length && TODO_WORD.test(Comment.combineDisplayParts(tag.content))) {
tag.content = stripTodoFromDisplayParts(tag.content);
}
}
return c;
}
Loading
Loading