Skip to content

Commit

Permalink
chore: fix prefering context instead of global types
Browse files Browse the repository at this point in the history
  • Loading branch information
lajbel committed Dec 18, 2024
1 parent f2c375e commit b1c5c9c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/components/Doc/TypeSig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ export const TypeSig = component$(({ data, parentData }: Props) => {
return <Type>any</Type>;
case "NullKeyword":
return <Type>null</Type>;
case "UnknownKeyword":
return <Type>unknown</Type>;
case "ThisType":
return <Type>this</Type>;
case "UndefinedKeyword":
return <Type>undefined</Type>;
case "VoidKeyword":
Expand Down Expand Up @@ -128,11 +132,7 @@ export const TypeSig = component$(({ data, parentData }: Props) => {
default:
return (
<>
{keyword ? (
<span class="text-warning">Bug parsing {keyword}</span>
) : (
""
)}
{keyword ? <span class="text-warning">{keyword}</span> : ""}
</>
);
}
Expand Down
9 changes: 7 additions & 2 deletions src/components/Sidebar/entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,16 @@ export const getDocEntries = async () => {
renderList.push({
folder: groupName,
linkList: groups[groupName].entries.map((item: any) => {
const isCtxMember = ctxMembers.includes(item);
const isGlobal = allDoc[item] != null;
let asCtxMember = ctxMembers.includes(item);

if(isGlobal) {
asCtxMember = false;
}

return {
title: item,
link: isCtxMember ? `/doc/ctx/${item}` : `/doc/${item}`,
link: asCtxMember ? `/doc/ctx/${item}` : `/doc/${item}`,
description: `${getDocEntryDescription(item)}`,
};
}),
Expand Down

0 comments on commit b1c5c9c

Please sign in to comment.