Implement Abstract, Const and Let flags #611
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR add the following enums to
ReflectionFlag
:Additionally, each enum has it's implemented converter logic added.
Why?
No need to explain why
Abstract
symbols should reflect in the UI.For Let and Const, these are also important, Const is a read only symbol so the user should be aware of that. Let does not have much effect since we expose structure and not implementation hence let and var in that context are the same, however, if we state const we should state let as it's a language feature and should reflect in the UI to be consistent.
Abstract
In
ClassConverter
added logic to setAbstract
flag to eachDeclarationReflection
that represents an abstract class, following the same logic for each abstract member of that class (FunctionConverter
,VariableConverter
)Theming Notes:
Abstract
enum is also set as a relevant flags, hence showing in native themes.overwrites
property of a member the overwrites an abstract parent member is left as is. This means it will still show overwrites which is not the right terminology, might require a custom fix in the templates. You can see if you "overwrite" an abstract parent by checking if it has theAbstract
flag.Const & Let
In
VariableConverter
added logic to setConst
orLet
flag to eachDeclarationReflection
that represents a variable where the typescript node's parent has Const or Let node flags set.A
var
variable should be inferred whenever a reflection of kindReflectionKind.Variable
has no Let or Const flags.Theming Notes:
Const
andLet
enums are also set as a relevant flags, hence showing in native themes. (var will not display, as is now)