Skip to content

Conversation

@wayneparrott
Copy link
Collaborator

Similar to our test failures, others have struggled with dtslint failing
(false negative) due to inconsistent union type ordering. It appears
that $ExpectType can be extended to list different orderings for
union types (permutations). In our case we have encountered issues with
this rule:

// $ExpectType Duration | Time

Extending this rule with an alternative ordering:

// $ExpectType Duration | Time || Time | Duration

Similar to our test failures, others have struggled with dtslint failing
(false negative) due to inconsistent union type ordering. It appears
that $ExpectType <union> can be extended to list different orderings for
union types (permutations). In our case we have encountered issues with
this rule:
```
// $ExpectType Duration | Time
```
Extending this rule with an alternative ordering:
```
// $ExpectType Duration | Time || Time | Duration
```
Copy link
Member

@minggangw minggangw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@minggangw minggangw merged commit ba45911 into RobotWebTools:develop Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants