Skip to content

Making IManagedClasses<T>.managedClasses optional #917

@prabashn

Description

@prabashn

What is your feature request? Please describe.
Whenever I have a child component from FAST, I like to use the prop contract types FAST defines. For example for a text field, I would use TextFieldProps, which look like this:

export declare type TextFieldProps = ITextFieldHandledProps & ITextFieldUnhandledProps & ITextFieldManagedClasses;

Notice this type is composed of 3 types:

  1. ITextFieldHandledProps - all partial props
  2. ITextFieldUnhandledProps - all partial props
  3. ITextFieldManagedClasses - not a partial. managedClasses is a required property.

Describe the solution you'd like
Making IManagedClasses.managedClasses optional so that when I need to create the prop object for a component, I don't need to keep passing in managedClasses: undefined (this is really problematic in unit tests for example).

Describe alternatives you've considered
As a work-around I'm passing 'managedClasses: undefined' everywhere this crops up (usually in unit tests), but would love to clean up the code by removing that unnecessary part.

Additional context
N/A

Metadata

Metadata

Assignees

Labels

improvementA non-feature-adding improvement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions