Use import type whenever possible

This commit is contained in:
DrMint 2024-07-13 13:05:20 +02:00
parent 04ce83b083
commit a5ca1ee9f2
8 changed files with 558 additions and 542 deletions

View File

@ -1,4 +1,4 @@
import { TrackRequestParams } from "./types";
import type { TrackRequestParams } from "./types";
type AnalyticsBody = Record<string, unknown> & {
type: "event" | "request";

View File

@ -1,4 +1,4 @@
import { MeiliDocument, SearchRequest, SearchResponse } from "./types";
import type { MeiliDocument, SearchRequest, SearchResponse } from "./types";
export class MeilisearchSDK {
constructor(

View File

@ -1,5 +1,4 @@
import { Collections } from "../payload/constants";
import {
import type {
EndpointCollectible,
EndpointPage,
EndpointFolder,
@ -9,7 +8,8 @@ import {
EndpointFile,
EndpointRecorder,
EndpointChronologyEvent,
} from "../payload/endpoint-types";
} from "payload/endpoint-types";
import { Collections } from "../payload/constants";
export type MeiliDocument = {
meilid: string;
@ -74,4 +74,4 @@ export type SearchRequest = {
q: string;
page: number;
types?: string[] | string | undefined;
};
};

View File

@ -1,4 +1,4 @@
import { RichTextContent } from "./rich-text";
import type { RichTextContent } from "./rich-text";
export interface TranscriptBlock extends GenericBlock {
lines: (LineBlock | CueBlock)[];

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +1,17 @@
import { Collections } from "./constants";
import {
EndpointAudioPreview,
EndpointImagePreview,
EndpointVideoPreview,
} from "./endpoint-types";
import {
GenericBlock,
SectionBlock,
TranscriptBlock,
BreakBlock,
type GenericBlock,
type SectionBlock,
type TranscriptBlock,
type BreakBlock,
isBlockTranscriptBlock,
isBlockBreakBlock,
} from "./blocks";
import { Collections } from "./constants";
import type {
EndpointImagePreview,
EndpointVideoPreview,
EndpointAudioPreview,
} from "./endpoint-types";
export type RichTextContent = {
root: {

View File

@ -1,24 +1,24 @@
import { Collections } from "./constants";
import {
EndpointAllIds,
EndpointAllSDKUrls,
EndpointAudio,
EndpointChronologyEvent,
import type {
EndpointWebsiteConfig,
EndpointFolder,
EndpointLanguage,
EndpointCurrency,
EndpointWording,
EndpointPage,
EndpointCollectible,
EndpointCollectibleScans,
EndpointCollectibleScanPage,
EndpointCollectibleGallery,
EndpointCollectibleGalleryImage,
EndpointCollectibleScanPage,
EndpointCollectibleScans,
EndpointCurrency,
EndpointFile,
EndpointFolder,
EndpointChronologyEvent,
EndpointImage,
EndpointLanguage,
EndpointPage,
EndpointRecorder,
EndpointAudio,
EndpointVideo,
EndpointWebsiteConfig,
EndpointWording,
EndpointFile,
EndpointRecorder,
EndpointAllSDKUrls,
EndpointAllIds,
} from "./endpoint-types";
export const getSDKEndpoint = {

View File

@ -1,4 +1,4 @@
import { Collections } from "./constants";
import type { Collections } from "./constants";
export type AfterOperationWebHookMessage = {
collection: Collections;