Skip to content

Commit

Permalink
Fix missing types
Browse files Browse the repository at this point in the history
  • Loading branch information
kossnocorp committed Dec 18, 2023
1 parent 7ccbb9e commit 1b38641
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"start": "env NODE_ENV=development ts-node -r tsconfig-paths/register devServer.ts"
},
"dependencies": {
"@date-fns/docs": "0.28.0",
"@date-fns/docs": "0.29.0",
"@sentry/browser": "^5.30.0",
"@sentry/tracing": "^5.30.0",
"@switcher/preact": "2.3.0",
Expand Down
6 changes: 6 additions & 0 deletions src/ui/screens/Docs/Doc/TypeDoc/Types/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,16 @@ function extractTypes(
// Add these types, but not process their children
case DateFnsDocs.ReflectionKind.Interface:
case DateFnsDocs.ReflectionKind.TypeAlias:
case DateFnsDocs.ReflectionKind.ObjectLiteral:
// Ignore external, i.e. Record
if (child.flags.isExternal) return
types.push(child)
return

// Ignore the properties (i.e. weekStartsOn from Locale)
case DateFnsDocs.ReflectionKind.Property:
return

default:
console.log('~~~ UNHANDLED TYPE', child.kind, child)
}
Expand Down Expand Up @@ -341,6 +346,7 @@ function kindToBadgeStyle(

function kindToBadgeTitle(kind: DateFnsDocs.ReflectionKind): string {
switch (kind) {
case DateFnsDocs.ReflectionKind.ObjectLiteral:
case DateFnsDocs.ReflectionKind.TypeAlias:
return 'Alias'

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,10 @@
dependencies:
"@jridgewell/trace-mapping" "0.3.9"

"@date-fns/docs@0.28.0":
version "0.28.0"
resolved "https://registry.yarnpkg.com/@date-fns/docs/-/docs-0.28.0.tgz#34ea461448a1ddf03229fd05fd9e1743d34fafbd"
integrity sha512-z25oyKESxveam+0Vr9KHOHcONZ8DaotKWItQQXdYDAqRitRRYGgMZi0JiRuno5oiZhcrhKk+ygwBzRIa7hVhxQ==
"@date-fns/docs@0.29.0":
version "0.29.0"
resolved "https://registry.yarnpkg.com/@date-fns/docs/-/docs-0.29.0.tgz#7bc9d0f1be754a2d03f76b550536c64d1e69119d"
integrity sha512-Idn+nrjcSKthq+EkP/PhbQXkqrtdpF3KXXq/zec/MBCQg9MNkBiA646ovCyV8Q2t1RoEuBADO+W83QEUmXNXZA==
dependencies:
firebase-admin "^11.4.1"
js-fns "^2.5.2"
Expand Down

0 comments on commit 1b38641

Please sign in to comment.