Skip to content

Commit d3e5718

Browse files
committed
fix: change imports to type imports for better type checking
1 parent d8a2d11 commit d3e5718

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SrcOptions, Transformation, UploadOptions, UploadResponse } from "./interfaces";
1+
import type { SrcOptions, Transformation, UploadOptions, UploadResponse } from "./interfaces";
22
import { ImageKitAbortError, ImageKitInvalidRequestError, ImageKitServerError, ImageKitUploadNetworkError, upload } from "./upload";
33
import { buildSrc, buildTransformationString } from "./url";
44

src/upload.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import errorMessages from "./constants/errorMessages";
2-
import { ResponseMetadata, UploadOptions, UploadResponse } from "./interfaces";
2+
import type { ResponseMetadata, UploadOptions, UploadResponse } from "./interfaces";
33

44
/**
55
* Represents an error when a request to ImageKit is invalid.

src/url.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { SrcOptions } from "./interfaces";
2-
import { ImageOverlay, SolidColorOverlay, SubtitleOverlay, TextOverlay, Transformation, VideoOverlay } from "./interfaces/Transformation";
1+
import type { SrcOptions } from "./interfaces";
2+
import type { ImageOverlay, SolidColorOverlay, SubtitleOverlay, TextOverlay, Transformation, VideoOverlay } from "./interfaces/Transformation";
33
import transformationUtils, { safeBtoa } from "./utils/transformation";
44
const TRANSFORMATION_PARAMETER = "tr";
55
const SIMPLE_OVERLAY_PATH_REGEX = new RegExp('^[a-zA-Z0-9-._/ ]*$')

src/utils/transformation.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import { TransformationPosition, SrcOptions } from "../interfaces";
33

44
const QUERY_TRANSFORMATION_POSITION: TransformationPosition = "query";
55
const PATH_TRANSFORMATION_POSITION: TransformationPosition = "path";
6-
const DEFAULT_TRANSFORMATION_POSITION: TransformationPosition = QUERY_TRANSFORMATION_POSITION;
7-
const VALID_TRANSFORMATION_POSITIONS = [PATH_TRANSFORMATION_POSITION, QUERY_TRANSFORMATION_POSITION];
86
const CHAIN_TRANSFORM_DELIMITER: string = ":";
97
const TRANSFORM_DELIMITER: string = ",";
108
const TRANSFORM_KEY_VALUE_DELIMITER: string = "-";

0 commit comments

Comments
 (0)