elsa-workflows / elsa-workflows/elsa-core

Extend TypeScript Definitions

Open
#1,671 1 comment 0 reactions 0 assignees View on GitHub
enhancement triaged
Dominant language
C#
Stars
7.9k
Forks
1.5k
Avg merge
15h 22m
Merged PRs (30d)
114

Description

Hi,

i have a custom (generic) activity - where the user can select an object type - and based on this we create a new business object.

It is simple like this:

[ActivityInput(Hint = "Objekttyp", OptionsProvider = typeof(ObjectTypeProvider), UIHint = ActivityInputUIHints.Dropdown)]
public string ObjectType { get; set; }

[ActivityOutput(DefaultWorkflowStorageProvider = TransientWorkflowStorageProvider.ProviderName)]
public object Result { get; set; }

Now i want to provide Intellisense for the Result property. Currently it renders as object type "any" - since it is an object.

Would it be possible to extend the RenderJavaScriptTypeDefinitions class with some event or something like this - i think the main part will be the RenderActivityProperty - when i have a reference here to the activity instance - i could change the output for the Result property from Result(): any; to Result(): MyCustomType; ?

Contributor guide

Open the contributing guide

Research direction

Start with RenderJavaScriptTypeDefinitions and its RenderActivityProperty method, which the issue identifies as the likely extension point. Determine how the activity instance could provide a custom type for the Result property, replacing the generated any type with MyCustomType. Done means the generated definition supports this customization for the described activity.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, typescript
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.