fumadocs-typescript 4.0.13 → 4.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +16 -9
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -216,7 +216,7 @@ function generate(program, name, declaration, { allowInternal = false, transform
216
216
  };
217
217
  }
218
218
  function getDocEntry(prop, context) {
219
- var _a;
219
+ var _a, _b;
220
220
  const { transform, program } = context;
221
221
  if (context.type.isClass() && prop.getName().startsWith("#")) {
222
222
  return;
@@ -229,16 +229,26 @@ function getDocEntry(prop, context) {
229
229
  text: ts2.displayPartsToString(tag.getText())
230
230
  })
231
231
  );
232
+ let type = subType.getText(
233
+ context.declaration,
234
+ ts2.TypeFormatFlags.UseAliasDefinedOutsideCurrentScope | ts2.TypeFormatFlags.NoTruncation
235
+ );
232
236
  let simplifiedType = getSimpleForm(
233
237
  subType,
234
238
  program.getTypeChecker(),
235
239
  isOptional,
236
240
  context.declaration
237
241
  );
238
- const remarksTag = tags.find((tag) => tag.name === "remarks");
239
- if (remarksTag) {
240
- const match = (_a = new RegExp("^`(?<name>.+)`").exec(remarksTag.text)) == null ? void 0 : _a[1];
241
- if (match) simplifiedType = match;
242
+ for (const tag of tags) {
243
+ if (tag.name === "fumadocsType") {
244
+ const match = (_a = new RegExp("`(?<name>.+)`$").exec(tag.text)) == null ? void 0 : _a[1];
245
+ if (match) type = match;
246
+ continue;
247
+ }
248
+ if (tag.name === "remarks") {
249
+ const match = (_b = new RegExp("^`(?<name>.+)`").exec(tag.text)) == null ? void 0 : _b[1];
250
+ if (match) simplifiedType = match;
251
+ }
242
252
  }
243
253
  const entry = {
244
254
  name: prop.getName(),
@@ -248,10 +258,7 @@ function getDocEntry(prop, context) {
248
258
  )
249
259
  ),
250
260
  tags,
251
- type: subType.getText(
252
- context.declaration,
253
- ts2.TypeFormatFlags.UseAliasDefinedOutsideCurrentScope | ts2.TypeFormatFlags.NoTruncation
254
- ),
261
+ type,
255
262
  simplifiedType,
256
263
  required: !isOptional,
257
264
  deprecated: tags.some((tag) => tag.name === "deprecated")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-typescript",
3
- "version": "4.0.13",
3
+ "version": "4.0.14",
4
4
  "description": "Typescript Integration for Fumadocs",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -42,14 +42,14 @@
42
42
  "@types/estree": "^1.0.8",
43
43
  "@types/hast": "^3.0.4",
44
44
  "@types/mdast": "^4.0.4",
45
- "@types/node": "24.10.0",
46
- "@types/react": "^19.2.2",
47
- "@types/react-dom": "^19.2.2",
45
+ "@types/node": "24.10.2",
46
+ "@types/react": "^19.2.7",
47
+ "@types/react-dom": "^19.2.3",
48
48
  "typescript": "^5.9.3",
49
49
  "unified": "^11.0.5",
50
50
  "eslint-config-custom": "0.0.0",
51
- "fumadocs-core": "16.0.8",
52
- "fumadocs-ui": "16.0.8",
51
+ "fumadocs-core": "16.2.4",
52
+ "fumadocs-ui": "16.2.4",
53
53
  "tsconfig": "0.0.0"
54
54
  },
55
55
  "peerDependencies": {