ballerina-lang icon indicating copy to clipboard operation
ballerina-lang copied to clipboard

[Improvement]: Support extraction of constants from type definitions

Open LakshanWeerasinghe opened this issue 1 year ago • 0 comments

Description

When users declare new types as unions of literal values, they often need to extract these literals as constants for reuse throughout their codebase. However, our current code action for extracting constants does not support this scenario.

eg:

type LoanType "personal"|"educational"|"housing"|"business";

By doing this users will experience a smoother workflow when working with type definitions containing unions of literal values.

LakshanWeerasinghe avatar Mar 21 '24 11:03 LakshanWeerasinghe