Skip to content

Commit 02d730d

Browse files
committed
Revert "Revert "wip changes""
This reverts commit 54c8c22b1e3841122392014b08b4fa16af6ecf6f.
1 parent b037879 commit 02d730d

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.typedoc/custom-plugin.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,12 @@ function getCatchAllReplacements() {
135135
pattern: /\*\*Deprecated\*\*/g,
136136
replace: '**Deprecated.**',
137137
},
138+
// Remove the standard experimental API notice block (with or without leading/trailing whitespace or newlines)
139+
{
140+
pattern:
141+
/(?:\r?\n)?\*\*`Experimental`\*\*\r?\n\r?\nThis is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change\.\r?\nIt is advised to pin the SDK version to avoid breaking changes\.\r?\n?/g,
142+
replace: '',
143+
},
138144
{
139145
/**
140146
* By default, `@default` is output with "**Default** `value`". We want to capture the value and place it inside "Defaults to `value`."

.typedoc/custom-theme.mjs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,31 @@ class ClerkMarkdownThemeContext extends MarkdownThemeContext {
220220

221221
// Extract the Accessors group (if any) and prevent default rendering for it
222222
const originalGroups = customizedModel.groups;
223+
224+
const experimentalGroups = originalGroups?.find(g =>
225+
g?.owningReflection?.comment?.modifierTags.has('@experimental'),
226+
);
227+
228+
if (experimentalGroups) {
229+
const groupsWithoutMethods = originalGroups?.filter(g => g.title === 'Properties');
230+
231+
customizedModel.groups = groupsWithoutMethods;
232+
const nonAccessorOutput = superPartials.memberWithGroups(customizedModel, options);
233+
customizedModel.groups = originalGroups;
234+
235+
return nonAccessorOutput;
236+
}
237+
223238
const accessorsGroup = originalGroups?.find(g => g.title === 'Accessors');
224239
const groupsWithoutAccessors = originalGroups?.filter(g => g.title !== 'Accessors');
225240

226241
customizedModel.groups = groupsWithoutAccessors;
227242
const nonAccessorOutput = superPartials.memberWithGroups(customizedModel, options);
243+
244+
if (experimentalGroups) {
245+
return nonAccessorOutput;
246+
}
247+
228248
customizedModel.groups = originalGroups;
229249

230250
/** @type {string[]} */

0 commit comments

Comments
 (0)