Skip to content

Commit e04ca7b

Browse files
refactor: use isIntrinsicErrorType
1 parent be42475 commit e04ca7b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎packages/type-utils/src/TypeOrValueSpecifier.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { getCanonicalFileName } from '@typescript-eslint/typescript-estree';
22
import type { JSONSchema4 } from '@typescript-eslint/utils/json-schema';
33
import path from 'path';
4+
import * as tsutils from 'ts-api-utils';
45
import type * as ts from 'typescript';
56

67
interface FileSpecifier {
@@ -186,8 +187,7 @@ export function typeMatchesSpecifier(
186187
specifier: TypeOrValueSpecifier,
187188
program: ts.Program,
188189
): boolean {
189-
// TODO: use `tsutils.isErrorType(type)` -- That function doesn't exists yet.
190-
if (type.intrinsicName === 'error') {
190+
if (tsutils.isIntrinsicErrorType(type)) {
191191
return false;
192192
}
193193
if (typeof specifier === 'string') {

0 commit comments

Comments
 (0)