1+ /* eslint-disable @typescript-eslint/no-unused-vars */
2+
13/**
24 * Check that the type of `value` is identical to type `T`.
35 *
46 * @param value - Value that should be identical to type `T`.
57 */
6- // @ts -ignore
7- export const expectType = < T > ( value : T ) => { // tslint:disable-line:no-unused
8+ // @ts -expect-error
9+ export const expectType = < T > ( value : T ) => {
810 // Do nothing, the TypeScript compiler handles this for us
911} ;
1012
@@ -13,8 +15,9 @@ export const expectType = <T>(value: T) => { // tslint:disable-line:no-unused
1315 *
1416 * @param value - Value that should be identical to type `T`.
1517 */
16- // @ts -ignore
17- export const expectNotType = < T > ( value : any ) => { // tslint:disable-line:no-unused
18+ // @ts -expect-error
19+ export const expectNotType = < T > ( value : any ) => {
20+ // eslint-disable-next-line no-warning-comments
1821 // TODO Use a `not T` type when possible https://github.com/microsoft/TypeScript/pull/29317
1922 // Do nothing, the TypeScript compiler handles this for us
2023} ;
@@ -24,8 +27,8 @@ export const expectNotType = <T>(value: any) => { // tslint:disable-line:no-unu
2427 *
2528 * @param value - Value that should be assignable to type `T`.
2629 */
27- // @ts -ignore
28- export const expectAssignable = < T > ( value : T ) => { // tslint:disable-line:no-unused
30+ // @ts -expect-error
31+ export const expectAssignable = < T > ( value : T ) => {
2932 // Do nothing, the TypeScript compiler handles this for us
3033} ;
3134
@@ -34,8 +37,8 @@ export const expectAssignable = <T>(value: T) => { // tslint:disable-line:no-un
3437 *
3538 * @param value - Value that should not be assignable to type `T`.
3639 */
37- // @ts -ignore
38- export const expectNotAssignable = < T > ( value : any ) => { // tslint:disable-line:no-unused
40+ // @ts -expect-error
41+ export const expectNotAssignable = < T > ( value : any ) => {
3942 // Do nothing, the TypeScript compiler handles this for us
4043} ;
4144
@@ -44,8 +47,8 @@ export const expectNotAssignable = <T>(value: any) => { // tslint:disable-line:
4447 *
4548 * @param value - Value that should be checked.
4649 */
47- // @ts -ignore
48- export const expectError = < T = any > ( value : T ) => { // tslint:disable-line:no-unused
50+ // @ts -expect-error
51+ export const expectError = < T = any > ( value : T ) => {
4952 // Do nothing, the TypeScript compiler handles this for us
5053} ;
5154
@@ -54,8 +57,8 @@ export const expectError = <T = any>(value: T) => { // tslint:disable-line:no-u
5457 *
5558 * @param expression - Expression that should be marked as `@deprecated`.
5659 */
57- // @ts -ignore
58- export const expectDeprecated = ( expression : any ) => { // tslint:disable-line:no-unused
60+ // @ts -expect-error
61+ export const expectDeprecated = ( expression : any ) => {
5962 // Do nothing, the TypeScript compiler handles this for us
6063} ;
6164
@@ -64,8 +67,8 @@ export const expectDeprecated = (expression: any) => { // tslint:disable-line:n
6467 *
6568 * @param expression - Expression that should not be marked as `@deprecated`.
6669 */
67- // @ts -ignore
68- export const expectNotDeprecated = ( expression : any ) => { // tslint:disable-line:no-unused
70+ // @ts -expect-error
71+ export const expectNotDeprecated = ( expression : any ) => {
6972 // Do nothing, the TypeScript compiler handles this for us
7073} ;
7174
@@ -74,7 +77,7 @@ export const expectNotDeprecated = (expression: any) => { // tslint:disable-lin
7477 *
7578 * @param expression - Expression whose type should be printed as a warning.
7679 */
77- // @ts -ignore
78- export const printType = ( expression : any ) => { // tslint:disable-line:no-unused
80+ // @ts -expect-error
81+ export const printType = ( expression : any ) => {
7982 // Do nothing, the TypeScript compiler handles this for us
8083} ;
0 commit comments