Skip to content

Commit 8aa0382

Browse files
fix: broken imports in esm + typescript <5.5
1 parent b6ff846 commit 8aa0382

9 files changed

+9
-9
lines changed

src/etc/could-be-function.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as ts from 'typescript';
1+
import ts from 'typescript';
22
import { couldBeType } from './could-be-type';
33

44
export function couldBeFunction(type: ts.Type): boolean {

src/etc/could-be-type.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as tsutils from 'ts-api-utils';
2-
import * as ts from 'typescript';
2+
import ts from 'typescript';
33

44
export function couldBeType(
55
type: ts.Type,

src/etc/get-loc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { TSESTree } from '@typescript-eslint/utils';
2-
import * as ts from 'typescript';
2+
import ts from 'typescript';
33

44
export function getLoc(node: ts.Node): TSESTree.SourceLocation {
55
const sourceFile = node.getSourceFile();

src/etc/get-type-services.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ESLintUtils, TSESLint, TSESTree } from '@typescript-eslint/utils';
22
import * as tsutils from 'ts-api-utils';
3-
import * as ts from 'typescript';
3+
import ts from 'typescript';
44
import { couldBeFunction } from './could-be-function';
55
import { couldBeType as tsutilsEtcCouldBeType } from './could-be-type';
66
import { isArrowFunctionExpression, isFunctionDeclaration } from './is';

src/rules/no-cyclic-action.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { TSESTree as es } from '@typescript-eslint/utils';
22
import { stripIndent } from 'common-tags';
3-
import * as ts from 'typescript';
3+
import ts from 'typescript';
44
import { defaultObservable } from '../constants';
55
import { getTypeServices, isCallExpression, isIdentifier } from '../etc';
66
import { ruleCreator } from '../utils';

src/rules/no-unsafe-subject-next.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { TSESTree as es } from '@typescript-eslint/utils';
22
import * as tsutils from 'ts-api-utils';
3-
import * as ts from 'typescript';
3+
import ts from 'typescript';
44
import {
55
couldBeType,
66
getTypeServices,

src/rules/throw-error.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { TSESTree as es, ESLintUtils } from '@typescript-eslint/utils';
22
import * as tsutils from 'ts-api-utils';
3-
import * as ts from 'typescript';
3+
import ts from 'typescript';
44
import { couldBeFunction, couldBeType, getTypeServices } from '../etc';
55
import { ruleCreator } from '../utils';
66

tests/etc/could-be-type.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as ts from 'typescript';
1+
import ts from 'typescript';
22
import { couldBeType } from '../../src/etc/could-be-type';
33
import { createSourceFileAndTypeChecker } from './create-source-file-and-type-checker';
44

tests/etc/create-source-file-and-type-checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as tsvfs from '@typescript/vfs';
2-
import * as ts from 'typescript';
2+
import ts from 'typescript';
33

44
interface SourceFileAndTypeChecker {
55
sourceFile: ts.SourceFile;

0 commit comments

Comments
 (0)