Skip to content

Generalize Wiki#2322

Draft
MaxAtoms wants to merge 3 commits intomainfrom
generalize-wiki
Draft

Generalize Wiki#2322
MaxAtoms wants to merge 3 commits intomainfrom
generalize-wiki

Conversation

@MaxAtoms
Copy link
Copy Markdown
Collaborator

This PR tracks the necessary changes to the flowR wiki in order to generalize it for usage within multiple projects.

Locally, I currently have this hacky solution of symlinking the dist/src directory of flowR into the other project's node_modules:

> rm -r node_modules/@eagleoutice/flowr/
> ln -s ../../../flowr/dist/src ./node_modules/@eagleoutice/flowr

@MaxAtoms MaxAtoms self-assigned this Feb 10, 2026
* @param segment - An optional segment within the page to link to (e.g., a header anchor).
*/
linkPage(pageName: ValidWikiDocumentTargetsNoSuffix | keyof typeof ConstantWikiLinkInfo, linkText?: string, segment?: string): string;
linkPage<T extends DocMakerLike[]>(pageName: ValidWikiDocumentTargetsNoSuffix<T> | keyof typeof ConstantWikiLinkInfo, linkText?: string, segment?: string): string;
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to have this generic on the interface level, but would always end up in a circular dependency between the individual DocMaker implementations and the DocMakerLike[] constraint

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also consider how we want to (type-safely) link to the flowR wiki from other wikis

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jeah, lets talk about that with time, i can also try to make this transition - getting this type safe with external projects is a little bit harder but easily doable (i imagine a generic on the interface level which defaults to flowR and that is then initialized type-wise with the respective context)

@EagleoutIce
Copy link
Copy Markdown
Member

it is fine so far but I dislike the generics directly at the use of e.g. linkPage my original idea for this was (@MaxAtoms) to keep the wiki pages locked in right now (as this is only a type system safety) but then other wiki pages could add another extension layer (and theoretically we can do the same for flowR if you want to keep the general structure type-safe) which then as casts the context to the desired type in the text receiver; wdyt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants