Skip to content

Commit 57d6b69

Browse files
fix: update imports to use functions directly
- Remove type keyword from imports where functions are used - Fix remaining unused imports in REST API files - Update import statements to match actual usage
1 parent eeb7cec commit 57d6b69

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

rest/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { getProfile } from "./profile.ts";
22
import type { TargetedResponse } from "./targeted_response.ts";
3-
import { type createErrorResponse, createSuccessResponse } from "./utils.ts";
3+
import { createSuccessResponse } from "./utils.ts";
44
import type { HTTPError } from "./responseIntoResult.ts";
55
import type { AbortError, NetworkError } from "./robustFetch.ts";
66
import type { ExtendedOptions } from "./options.ts";

rest/getTweetInfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { type ExtendedOptions, setDefaults } from "./options.ts";
1010
import type { TargetedResponse } from "./targeted_response.ts";
1111
import {
1212
createErrorResponse,
13-
createSuccessResponse,
13+
type createSuccessResponse,
1414
createTargetedResponse,
1515
} from "./utils.ts";
1616
import type { FetchError } from "./mod.ts";

rest/getWebPageTitle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { parseHTTPError } from "./parseHTTPError.ts";
88
import { type ExtendedOptions, setDefaults } from "./options.ts";
99
import type { TargetedResponse } from "./targeted_response.ts";
1010
import {
11-
createErrorResponse,
11+
type createErrorResponse,
1212
createSuccessResponse,
1313
createTargetedResponse,
1414
} from "./utils.ts";

rest/profile.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import type { GuestUser, MemberUser } from "@cosense/types/rest";
22
import { cookie } from "./auth.ts";
33
import type { TargetedResponse } from "./targeted_response.ts";
44
import {
5-
type createErrorResponse,
6-
type createSuccessResponse,
5+
createErrorResponse,
6+
createSuccessResponse,
77
createTargetedResponse,
88
} from "./utils.ts";
99
import type { FetchError } from "./robustFetch.ts";

rest/replaceLinks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { cookie, getCSRFToken } from "./auth.ts";
77
import { parseHTTPError } from "./parseHTTPError.ts";
88
import type { TargetedResponse } from "./targeted_response.ts";
99
import {
10-
createErrorResponse,
10+
type createErrorResponse,
1111
createSuccessResponse,
1212
createTargetedResponse,
1313
} from "./utils.ts";

rest/search.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import { cookie } from "./auth.ts";
1010
import { parseHTTPError } from "./parseHTTPError.ts";
1111
import type { TargetedResponse } from "./targeted_response.ts";
1212
import {
13-
type createErrorResponse,
14-
type createSuccessResponse,
13+
createErrorResponse,
14+
createSuccessResponse,
1515
createTargetedResponse,
1616
} from "./utils.ts";
1717
import { type BaseOptions, setDefaults } from "./options.ts";

0 commit comments

Comments
 (0)