diff --git a/.changeset/soft-cats-hide.md b/.changeset/soft-cats-hide.md new file mode 100644 index 0000000..ca312ec --- /dev/null +++ b/.changeset/soft-cats-hide.md @@ -0,0 +1,5 @@ +--- +"@effect/docgen": patch +--- + +Typecheck namespace examples diff --git a/src/Core.ts b/src/Core.ts index 839da59..11a4387 100644 --- a/src/Core.ts +++ b/src/Core.ts @@ -183,6 +183,10 @@ const getExampleFiles = (modules: ReadonlyArray) => module.functions, getFiles("function") ) + const namespacesExamples = Array.flatMap( + module.namespaces, + getFiles("namespace") + ) return Array.flatten([ moduleExamples, @@ -190,7 +194,8 @@ const getExampleFiles = (modules: ReadonlyArray) => interfacesExamples, typeAliasesExamples, constantsExamples, - functionsExamples + functionsExamples, + namespacesExamples ]) }) })