Skip to content

Commit

Permalink
test(typescript-estree): add tests for optional variance syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed May 17, 2022
1 parent 0a74ba8 commit 0eb5560
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
@@ -0,0 +1 @@
type Mapper<in T, out U> = (x: T) => U;
@@ -0,0 +1 @@
type Processor<in out T> = (x: T) => T;
@@ -0,0 +1 @@
type Consumer<in T> = (x: T) => void;
@@ -0,0 +1 @@
type Provider<out T> = () => T;
Expand Up @@ -484,6 +484,14 @@ tester.addFixturePatternConfig('typescript/types', {
'template-literal-type-2',
'template-literal-type-3',
'template-literal-type-4',
/**
* [BABEL ERRORED, BUT TS-ESTREE DID NOT]
* Babel doesn't support TS 4.7 new features yet.
*/
'optional-variance-in',
'optional-variance-out',
'optional-variance-in-out',
'optional-variance-in-and-out',
],
});

Expand Down

0 comments on commit 0eb5560

Please sign in to comment.