Skip to content

Commit 0093a96

Browse files
authored
Use TypeScript type import for types (#894)
1 parent 37c061f commit 0093a96

File tree

92 files changed

+171
-125
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+171
-125
lines changed

.changeset/angry-suns-lie.md

Lines changed: 5 additions & 0 deletions

biome.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
"level": "error",
3434
"options": { "syntax": "shorthand" }
3535
},
36-
"useImportType": "off",
3736
"useTemplate": "off"
3837
},
3938
"suspicious": {

src/transforms/v2-to-v3/apis/addEmptyObjectForUndefined.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { Collection, JSCodeshift } from "jscodeshift";
1+
import type { Collection, JSCodeshift } from "jscodeshift";
22

3-
import { ClientIdentifier } from "../types";
3+
import type { ClientIdentifier } from "../types";
44

55
// Adds an empty object, if undefined is passed for optional parameters.
66
export const addEmptyObjectForUndefined = (

src/transforms/v2-to-v3/apis/addNotSupportedClientComments.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { Collection, JSCodeshift } from "jscodeshift";
1+
import type { Collection, JSCodeshift } from "jscodeshift";
22

33
import { FUNCTION_TYPE_LIST, NOT_SUPPORTED_COMMENT, S3 } from "../config";
4-
import { ClientIdentifier } from "../types";
4+
import type { ClientIdentifier } from "../types";
55
import { getClientApiCallExpression } from "./getClientApiCallExpression";
66
import { getClientWaiterCallExpression } from "./getClientWaiterCallExpression";
77
import { getClientWaiterStates } from "./getClientWaiterStates";

src/transforms/v2-to-v3/apis/addPromiseRemovalComments.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Collection, JSCodeshift } from "jscodeshift";
1+
import type { Collection, JSCodeshift } from "jscodeshift";
22

33
export const addPromiseRemovalComments = (j: JSCodeshift, source: Collection<unknown>): void => {
44
// Add comment for .promise() calls which weren't removed.

src/transforms/v2-to-v3/apis/getArgsWithoutWaiterConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ObjectExpression, ObjectProperty, Property } from "jscodeshift";
1+
import type { ObjectExpression, ObjectProperty, Property } from "jscodeshift";
22

33
import { OBJECT_PROPERTY_TYPE_LIST } from "../config";
44

src/transforms/v2-to-v3/apis/getClientApiCallExpression.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { CallExpression } from "jscodeshift";
1+
import type { CallExpression } from "jscodeshift";
22

3-
import { ClientIdentifier } from "../types";
3+
import type { ClientIdentifier } from "../types";
44

55
export const getClientApiCallExpression = (
66
clientId: ClientIdentifier,

src/transforms/v2-to-v3/apis/getClientIdNamesFromNewExpr.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
import { Collection, Identifier, JSCodeshift, MemberExpression, NewExpression } from "jscodeshift";
1+
import type {
2+
Collection,
3+
Identifier,
4+
JSCodeshift,
5+
MemberExpression,
6+
NewExpression,
7+
} from "jscodeshift";
28

39
import { DOCUMENT_CLIENT, DYNAMODB, DYNAMODB_DOCUMENT_CLIENT } from "../config";
410
import { getClientNewExpression } from "../utils";

src/transforms/v2-to-v3/apis/getClientIdNamesFromTSTypeRef.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Collection, JSCodeshift } from "jscodeshift";
1+
import type { Collection, JSCodeshift } from "jscodeshift";
22

33
export interface GetClientIdNamesFromTSTypeRefOptions {
44
v2ClientName: string;

src/transforms/v2-to-v3/apis/getClientIdThisExpressions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Collection, Identifier, JSCodeshift, MemberExpression } from "jscodeshift";
2-
import { ThisMemberExpression } from "../types";
1+
import type { Collection, Identifier, JSCodeshift, MemberExpression } from "jscodeshift";
2+
import type { ThisMemberExpression } from "../types";
33

44
const thisMemberExpression = { type: "MemberExpression", object: { type: "ThisExpression" } };
55

0 commit comments

Comments
 (0)