We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be42475 commit e04ca7bCopy full SHA for e04ca7b
packages/type-utils/src/TypeOrValueSpecifier.ts
@@ -1,6 +1,7 @@
1
import { getCanonicalFileName } from '@typescript-eslint/typescript-estree';
2
import type { JSONSchema4 } from '@typescript-eslint/utils/json-schema';
3
import path from 'path';
4
+import * as tsutils from 'ts-api-utils';
5
import type * as ts from 'typescript';
6
7
interface FileSpecifier {
@@ -186,8 +187,7 @@ export function typeMatchesSpecifier(
186
187
specifier: TypeOrValueSpecifier,
188
program: ts.Program,
189
): boolean {
- // TODO: use `tsutils.isErrorType(type)` -- That function doesn't exists yet.
190
- if (type.intrinsicName === 'error') {
+ if (tsutils.isIntrinsicErrorType(type)) {
191
return false;
192
}
193
if (typeof specifier === 'string') {
0 commit comments