Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

chore(lab,charts): type-check .doc.mjs files like core (#4435)

Joey19e1c847fc5a
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index bf61825807..02b08a310a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -186,6 +186,14 @@ jobs:
if: needs.check-scope.outputs.docsite_only != 'true'
run: pnpm -F @astryxdesign/core typecheck:docs
+ - name: Typecheck lab docs
+ if: needs.check-scope.outputs.docsite_only != 'true'
+ run: pnpm -F @astryxdesign/lab typecheck:docs
+
+ - name: Typecheck charts docs
+ if: needs.check-scope.outputs.docsite_only != 'true'
+ run: pnpm -F @astryxdesign/charts typecheck:docs
+
- name: Typecheck template docs
if: needs.check-scope.outputs.docsite_only != 'true'
run: pnpm -F @astryxdesign/cli typecheck:template-docs
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index de10d1d108..cd6f7bc43b 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -78,6 +78,12 @@ jobs:
- name: Typecheck component docs
run: pnpm -F @astryxdesign/core typecheck:docs
+ - name: Typecheck lab docs
+ run: pnpm -F @astryxdesign/lab typecheck:docs
+
+ - name: Typecheck charts docs
+ run: pnpm -F @astryxdesign/charts typecheck:docs
+
- name: Typecheck template docs
run: pnpm -F @astryxdesign/cli typecheck:template-docs
diff --git a/packages/charts/package.json b/packages/charts/package.json
index 9b1cf71111..daf75b9dfb 100644
--- a/packages/charts/package.json
+++ b/packages/charts/package.json
@@ -53,6 +53,7 @@
"test": "vitest run --root ../..",
"test:watch": "vitest --root ../..",
"lint": "eslint src",
+ "typecheck:docs": "tsc --project tsconfig.docs.json",
"typecheck": "tsc --project tsconfig.json --noEmit"
},
"peerDependencies": {
diff --git a/packages/charts/tsconfig.docs.json b/packages/charts/tsconfig.docs.json
new file mode 100644
index 0000000000..37e141a39c
--- /dev/null
+++ b/packages/charts/tsconfig.docs.json
@@ -0,0 +1,10 @@
+{
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "rootDir": "../..",
+ "allowJs": true,
+ "checkJs": true,
+ "noEmit": true
+ },
+ "include": ["src/**/*.doc.mjs", "../core/src/docs-types.ts"]
+}
diff --git a/packages/lab/package.json b/packages/lab/package.json
index df4e8cc301..cfff707de3 100644
--- a/packages/lab/package.json
+++ b/packages/lab/package.json
@@ -53,6 +53,7 @@
"test": "vitest run --root ../..",
"test:watch": "vitest --root ../..",
"lint": "eslint src",
+ "typecheck:docs": "tsc --project tsconfig.docs.json",
"typecheck": "tsc --project tsconfig.json --noEmit"
},
"peerDependencies": {
diff --git a/packages/lab/src/Chart/ChartArea.doc.mjs b/packages/lab/src/Chart/ChartArea.doc.mjs
index 3c3d69a394..089664f5da 100644
--- a/packages/lab/src/Chart/ChartArea.doc.mjs
+++ b/packages/lab/src/Chart/ChartArea.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: 'ChartArea',
diff --git a/packages/lab/src/Chart/ChartBar.doc.mjs b/packages/lab/src/Chart/ChartBar.doc.mjs
index e0afe33550..ae8a5d7590 100644
--- a/packages/lab/src/Chart/ChartBar.doc.mjs
+++ b/packages/lab/src/Chart/ChartBar.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: 'ChartBar',
diff --git a/packages/lab/src/Chart/ChartCandlestick.doc.mjs b/packages/lab/src/Chart/ChartCandlestick.doc.mjs
index 72110c672d..997b9d141e 100644
--- a/packages/lab/src/Chart/ChartCandlestick.doc.mjs
+++ b/packages/lab/src/Chart/ChartCandlestick.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: 'ChartCandlestick',
diff --git a/packages/lab/src/Chart/ChartDot.doc.mjs b/packages/lab/src/Chart/ChartDot.doc.mjs
index ba98b2f289..9187194434 100644
--- a/packages/lab/src/Chart/ChartDot.doc.mjs
+++ b/packages/lab/src/Chart/ChartDot.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: 'ChartDot',
diff --git a/packages/lab/src/Chart/ChartDotGL.doc.mjs b/packages/lab/src/Chart/ChartDotGL.doc.mjs
index 656dff96c2..51e6d34797 100644
--- a/packages/lab/src/Chart/ChartDotGL.doc.mjs
+++ b/packages/lab/src/Chart/ChartDotGL.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: 'ChartDotGL',
diff --git a/packages/lab/src/Chart/ChartDotGLInteractive.doc.mjs b/packages/lab/src/Chart/ChartDotGLInteractive.doc.mjs
index 8b8a1fb1a1..12b4602981 100644
--- a/packages/lab/src/Chart/ChartDotGLInteractive.doc.mjs
+++ b/packages/lab/src/Chart/ChartDotGLInteractive.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: 'ChartDotGLInteractive',
diff --git a/packages/lab/src/Chart/ChartHeatmapGL.doc.mjs b/packages/lab/src/Chart/ChartHeatmapGL.doc.mjs
index 6cb9234011..32037ccfba 100644
--- a/packages/lab/src/Chart/ChartHeatmapGL.doc.mjs
+++ b/packages/lab/src/Chart/ChartHeatmapGL.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: 'ChartHeatmapGL',
diff --git a/packages/lab/src/Chart/ChartLine.doc.mjs b/packages/lab/src/Chart/ChartLine.doc.mjs
index e6b5b941e2..2817c42477 100644
--- a/packages/lab/src/Chart/ChartLine.doc.mjs
+++ b/packages/lab/src/Chart/ChartLine.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: 'ChartLine',
diff --git a/packages/lab/src/Chart/ChartStreamGL.doc.mjs b/packages/lab/src/Chart/ChartStreamGL.doc.mjs
index a2fbf08c67..feaf197937 100644
--- a/packages/lab/src/Chart/ChartStreamGL.doc.mjs
+++ b/packages/lab/src/Chart/ChartStreamGL.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: 'ChartStreamGL',
diff --git a/packages/lab/src/Chat/ChatEmojiPicker.doc.mjs b/packages/lab/src/Chat/ChatEmojiPicker.doc.mjs
index 091b449dc9..73615eadaf 100644
--- a/packages/lab/src/Chat/ChatEmojiPicker.doc.mjs
+++ b/packages/lab/src/Chat/ChatEmojiPicker.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: 'ChatEmojiPicker',
diff --git a/packages/lab/src/Chat/ChatReactionBar.doc.mjs b/packages/lab/src/Chat/ChatReactionBar.doc.mjs
index 90c73effa8..d776655621 100644
--- a/packages/lab/src/Chat/ChatReactionBar.doc.mjs
+++ b/packages/lab/src/Chat/ChatReactionBar.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: 'ChatReactionBar',
diff --git a/packages/lab/src/Chat/ChatTypingIndicator.doc.mjs b/packages/lab/src/Chat/ChatTypingIndicator.doc.mjs
index bcd32f8997..74e15c5f87 100644
--- a/packages/lab/src/Chat/ChatTypingIndicator.doc.mjs
+++ b/packages/lab/src/Chat/ChatTypingIndicator.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: 'ChatTypingIndicator',
diff --git a/packages/lab/src/Chat/ChatUnreadDivider.doc.mjs b/packages/lab/src/Chat/ChatUnreadDivider.doc.mjs
index 0b1117a11a..68b494ad3e 100644
--- a/packages/lab/src/Chat/ChatUnreadDivider.doc.mjs
+++ b/packages/lab/src/Chat/ChatUnreadDivider.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: 'ChatUnreadDivider',
diff --git a/packages/lab/src/ChatReasoning/ChatReasoning.doc.mjs b/packages/lab/src/ChatReasoning/ChatReasoning.doc.mjs
index ce94702847..df1c80478a 100644
--- a/packages/lab/src/ChatReasoning/ChatReasoning.doc.mjs
+++ b/packages/lab/src/ChatReasoning/ChatReasoning.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: 'ChatReasoning',
diff --git a/packages/lab/src/CodeEditor/CodeEditor.doc.mjs b/packages/lab/src/CodeEditor/CodeEditor.doc.mjs
index f64efe212c..41e2277a0f 100644
--- a/packages/lab/src/CodeEditor/CodeEditor.doc.mjs
+++ b/packages/lab/src/CodeEditor/CodeEditor.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: 'CodeEditor',
diff --git a/packages/lab/src/Drawer/Drawer.doc.mjs b/packages/lab/src/Drawer/Drawer.doc.mjs
index ade1c81957..f23a16c0f2 100644
--- a/packages/lab/src/Drawer/Drawer.doc.mjs
+++ b/packages/lab/src/Drawer/Drawer.doc.mjs
@@ -1,5 +1,5 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: 'Drawer',
@@ -123,7 +123,7 @@ const [lineItem, setLineItem] = useState(null);
],
};
-/** @type {import('../docs-types').TranslationDoc} */
+/** @type {import('../../../core/src/docs-types').TranslationDoc} */
export const docsZh = {
usage: {
description: '用于检查器、详情视图和面板的边缘浮层——"点击表格行查看详情"的模式。按 Escape 关闭抽屉,焦点返回到打开它的元素。滑入/滑出动画遵循 prefers-reduced-motion。堆叠约定:同级抽屉后开的在上层,Escape 只关闭最上层的,关闭顺序由内向外——请以同级方式渲染,切勿嵌套。',
@@ -139,7 +139,7 @@ export const docsZh = {
},
};
-/** @type {import('../docs-types').TranslationDoc} */
+/** @type {import('../../../core/src/docs-types').TranslationDoc} */
export const docsDense = {
description: 'edge-anchored overlay (native <dialog>): start/end side panel or top/bottom sheet',
usage: {
diff --git a/packages/lab/src/InfoTip/InfoTip.doc.mjs b/packages/lab/src/InfoTip/InfoTip.doc.mjs
index 784e60652b..4dd68c1e92 100644
--- a/packages/lab/src/InfoTip/InfoTip.doc.mjs
+++ b/packages/lab/src/InfoTip/InfoTip.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: 'InfoTip',
@@ -39,7 +39,7 @@ export const docs = {
},
};
-/** @type {import('../docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docsZh = {
name: 'InfoTip',
displayName: 'Info Tip',
@@ -75,7 +75,7 @@ export const docsZh = {
},
};
-/** @type {import('../docs-types').TranslationDoc} */
+/** @type {import('../../../core/src/docs-types').TranslationDoc} */
export const docsDense = {
description:
'Inline info-icon help affordance: accessible "i" button trigger pre-wired into a Tooltip.',
diff --git a/packages/lab/src/LogStream/LogStream.doc.mjs b/packages/lab/src/LogStream/LogStream.doc.mjs
index d1c4f23c2b..65e5aecb5a 100644
--- a/packages/lab/src/LogStream/LogStream.doc.mjs
+++ b/packages/lab/src/LogStream/LogStream.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: 'LogStream',
diff --git a/packages/lab/src/Radial/RadialChart.doc.mjs b/packages/lab/src/Radial/RadialChart.doc.mjs
index 64fc438e9d..d39c5a1118 100644
--- a/packages/lab/src/Radial/RadialChart.doc.mjs
+++ b/packages/lab/src/Radial/RadialChart.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: 'RadialChart',
diff --git a/packages/lab/src/RichTextEditor/RichTextEditor.doc.mjs b/packages/lab/src/RichTextEditor/RichTextEditor.doc.mjs
index 58703995b4..46612f71bf 100644
--- a/packages/lab/src/RichTextEditor/RichTextEditor.doc.mjs
+++ b/packages/lab/src/RichTextEditor/RichTextEditor.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: 'RichTextEditor',
diff --git a/packages/lab/src/SVGIcon/SVGIcon.doc.mjs b/packages/lab/src/SVGIcon/SVGIcon.doc.mjs
index 5cd66062b5..f1eb07a999 100644
--- a/packages/lab/src/SVGIcon/SVGIcon.doc.mjs
+++ b/packages/lab/src/SVGIcon/SVGIcon.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: 'SVGIcon',
diff --git a/packages/lab/src/Sankey/SankeyChart.doc.mjs b/packages/lab/src/Sankey/SankeyChart.doc.mjs
index 00043bf6f1..4028864344 100644
--- a/packages/lab/src/Sankey/SankeyChart.doc.mjs
+++ b/packages/lab/src/Sankey/SankeyChart.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: 'SankeyChart',
diff --git a/packages/lab/src/Schedule/Schedule.doc.mjs b/packages/lab/src/Schedule/Schedule.doc.mjs
index 3739c13b3f..1714ae5706 100644
--- a/packages/lab/src/Schedule/Schedule.doc.mjs
+++ b/packages/lab/src/Schedule/Schedule.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: 'Schedule',
diff --git a/packages/lab/src/Stat/Stat.doc.mjs b/packages/lab/src/Stat/Stat.doc.mjs
index 17ed3c7c67..5726ca60d3 100644
--- a/packages/lab/src/Stat/Stat.doc.mjs
+++ b/packages/lab/src/Stat/Stat.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: 'Stat',
@@ -70,7 +70,7 @@ export const docs = {
},
};
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docsZh = {
name: 'Stat',
displayName: 'Stat',
@@ -136,7 +136,7 @@ export const docsZh = {
},
};
-/** @type {import('../../core/src/docs-types').TranslationDoc} */
+/** @type {import('../../../core/src/docs-types').TranslationDoc} */
export const docsDense = {
description: 'KPI/metric display: label, large tabular-nums value, sentiment-aware delta, and trend media slot.',
usage: {
diff --git a/packages/lab/src/Stepper/Step.doc.mjs b/packages/lab/src/Stepper/Step.doc.mjs
index 4aabcb9183..bfccfbf21c 100644
--- a/packages/lab/src/Stepper/Step.doc.mjs
+++ b/packages/lab/src/Stepper/Step.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: 'Step',
diff --git a/packages/lab/src/Stepper/Stepper.doc.mjs b/packages/lab/src/Stepper/Stepper.doc.mjs
index 5b0c8b1701..ef9f1a64b9 100644
--- a/packages/lab/src/Stepper/Stepper.doc.mjs
+++ b/packages/lab/src/Stepper/Stepper.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: 'Stepper',
@@ -159,7 +159,7 @@ export const docs = {
},
};
-/** @type {import('../../core/src/docs-types').TranslationDoc} */
+/** @type {import('../../../core/src/docs-types').TranslationDoc} */
export const docsDense = {
description: 'numbered step sequence for multi-step workflows',
usage: {
@@ -206,7 +206,7 @@ export const docsDense = {
],
};
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docsZh = {
name: 'Stepper',
displayName: 'Stepper',
diff --git a/packages/lab/src/ThreeD/3DBar.doc.mjs b/packages/lab/src/ThreeD/3DBar.doc.mjs
index a75e65cf81..b56c8e667f 100644
--- a/packages/lab/src/ThreeD/3DBar.doc.mjs
+++ b/packages/lab/src/ThreeD/3DBar.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: '3DBar',
diff --git a/packages/lab/src/ThreeD/3DChart.doc.mjs b/packages/lab/src/ThreeD/3DChart.doc.mjs
index 5ed1cff0a2..24454fa49c 100644
--- a/packages/lab/src/ThreeD/3DChart.doc.mjs
+++ b/packages/lab/src/ThreeD/3DChart.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: '3DChart',
diff --git a/packages/lab/src/ThreeD/3DScatter.doc.mjs b/packages/lab/src/ThreeD/3DScatter.doc.mjs
index 9aa313d8c4..32fe7718ca 100644
--- a/packages/lab/src/ThreeD/3DScatter.doc.mjs
+++ b/packages/lab/src/ThreeD/3DScatter.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: '3DScatter',
diff --git a/packages/lab/src/ThreeD/3DScatterGL.doc.mjs b/packages/lab/src/ThreeD/3DScatterGL.doc.mjs
index 61a67916ab..269910f285 100644
--- a/packages/lab/src/ThreeD/3DScatterGL.doc.mjs
+++ b/packages/lab/src/ThreeD/3DScatterGL.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: '3DScatterGL',
diff --git a/packages/lab/src/ThreeD/3DSurface.doc.mjs b/packages/lab/src/ThreeD/3DSurface.doc.mjs
index 290f8bed47..13ad2dcc7d 100644
--- a/packages/lab/src/ThreeD/3DSurface.doc.mjs
+++ b/packages/lab/src/ThreeD/3DSurface.doc.mjs
@@ -1,6 +1,6 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
-/** @type {import('../../core/src/docs-types').ComponentDoc} */
+/** @type {import('../../../core/src/docs-types').ComponentDoc} */
export const docs = {
name: '3DSurface',
diff --git a/packages/lab/tsconfig.docs.json b/packages/lab/tsconfig.docs.json
new file mode 100644
index 0000000000..37e141a39c
--- /dev/null
+++ b/packages/lab/tsconfig.docs.json
@@ -0,0 +1,10 @@
+{
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "rootDir": "../..",
+ "allowJs": true,
+ "checkJs": true,
+ "noEmit": true
+ },
+ "include": ["src/**/*.doc.mjs", "../core/src/docs-types.ts"]
+}