C# → TypeScript workflow
These guides are written in English. · Building with an AI assistant?
Point your LLM at the docs so it understands them faster — it can also explain or translate the guides for you. Load the full documentation as a single file, or add any page's Markdown by appending .md to its URL. Works with Cursor (Add Docs), Claude, ChatGPT, Copilot and other LLMs.
If your pattern already has a GeneXus .NET implementation, the fastest faithful path is
to transcribe the editor classes to TypeScript against
@kbbridge/genexus-sdk, which
mirrors the GeneXus .NET pattern SDK.
Method
- Put the pattern's .NET sources in a git-ignored
reference/folder (never published). - Find the three editor classes — they are usually small even when the whole pattern is
large:
- the CustomTypeSupport (custom types),
- the EditorHelper (
CustomShowElement+GetCommands), - each PatternEditorCommand subclass.
- Transcribe class-by-class, annotating each TS class with
// Equivalent to <C# file>.
Only the editor behavior matters. Code generation, build/delete processes, validators and the instance object model are out of scope — KB Editor never runs them.
The .NET → SDK mapping
GeneXus .NET (Artech.Packages.Patterns.*) |
@kbbridge/genexus-sdk (TypeScript) |
|---|---|
PatternCustomTypeSupport.GetTypeEditor |
IPatternCustomTypeSupport.getTypeEditor |
PatternCustomTypeEditor.GetComboValues(...) |
IPatternCustomTypeEditor.getValues(ctx): CustomTypeValue[] |
PatternEditorHelper.CustomShowElement(el, ref caption, ref icon): bool |
customShowElement(el, ctx): {handled, caption, icon} |
PatternEditorHelper.GetCommands(el) |
getCommands(el): PatternEditorCommand[] |
PatternEditorCommand (Text/Query/Exec) |
PatternEditorCommandBase (text/query/exec) |
element.Type |
element.elementType |
element.Attributes.GetPropertyValue<T>("x") |
element.attributes['x'] |
Children.AddNewElement(tag) |
new PatternInstanceElement({tag,attributes,children}, parent, i, path) + parent.addChild(...) |
IDE dialogs (GenexusUIServices.*) |
VS Code APIs (QuickPick, showInputBox, …) |
Worked example
The kbbridge-editor-pattern-genexus-workwith
project is a complete, faithful transcription of the GeneXus Work With editor behavior. Read its
ai/EXAMPLES.md
for a file-by-file walkthrough.
Rules
- Never ship the .NET sources (or anything decompiled) — only your original TypeScript.
- Transcribe from your pattern's sources (or a pattern you have the rights to). If
porting a GeneXus-distributed pattern, add a
NOTICEattributing GeneXus and confirm distribution terms.
Next: Getting started.