From 36b479b906829da6a550bb8782379a3622f1f32d Mon Sep 17 00:00:00 2001 From: Anna Bocharova Date: Sat, 4 Oct 2025 12:58:31 +0200 Subject: [PATCH 1/6] Set verbatimModuleSyntax, adjust framework sources. --- express-zod-api/src/builtin-logger.ts | 6 +-- express-zod-api/src/common-helpers.ts | 14 +++---- express-zod-api/src/config-type.ts | 18 ++++---- express-zod-api/src/deep-checks.ts | 4 +- express-zod-api/src/depends-on-method.ts | 4 +- express-zod-api/src/diagnostics.ts | 4 +- express-zod-api/src/documentation-helpers.ts | 44 ++++++++++---------- express-zod-api/src/documentation.ts | 24 +++++------ express-zod-api/src/endpoint.ts | 29 +++++++------ express-zod-api/src/endpoints-factory.ts | 20 ++++----- express-zod-api/src/errors.ts | 2 +- express-zod-api/src/integration-base.ts | 6 +-- express-zod-api/src/integration.ts | 12 +++--- express-zod-api/src/json-schema-helpers.ts | 2 +- express-zod-api/src/last-resort.ts | 6 +-- express-zod-api/src/middleware.ts | 12 +++--- express-zod-api/src/result-handler.ts | 16 +++---- express-zod-api/src/result-helpers.ts | 8 ++-- express-zod-api/src/routable.ts | 2 +- express-zod-api/src/routing-walker.ts | 6 +-- express-zod-api/src/routing.ts | 18 ++++---- express-zod-api/src/server-helpers.ts | 8 ++-- express-zod-api/src/server.ts | 4 +- express-zod-api/src/sse.ts | 4 +- express-zod-api/src/testing.ts | 18 ++++---- express-zod-api/src/zts-helpers.ts | 4 +- express-zod-api/src/zts.ts | 12 ++++-- tsconfig.json | 1 + 28 files changed, 158 insertions(+), 150 deletions(-) diff --git a/express-zod-api/src/builtin-logger.ts b/express-zod-api/src/builtin-logger.ts index c2de34731..a04d18647 100644 --- a/express-zod-api/src/builtin-logger.ts +++ b/express-zod-api/src/builtin-logger.ts @@ -1,12 +1,12 @@ import ansis from "ansis"; import { inspect } from "node:util"; import { performance } from "node:perf_hooks"; -import { FlatObject, isProduction } from "./common-helpers.ts"; +import { type FlatObject, isProduction } from "./common-helpers.ts"; import { - AbstractLogger, + type AbstractLogger, formatDuration, isHidden, - Severity, + type Severity, styles, } from "./logger-helpers.ts"; diff --git a/express-zod-api/src/common-helpers.ts b/express-zod-api/src/common-helpers.ts index 96c2e3ece..3081b7925 100644 --- a/express-zod-api/src/common-helpers.ts +++ b/express-zod-api/src/common-helpers.ts @@ -1,16 +1,16 @@ -import { Request } from "express"; +import type { Request } from "express"; import * as R from "ramda"; import { z } from "zod"; -import { CommonConfig, InputSource, InputSources } from "./config-type.ts"; +import type { CommonConfig, InputSource, InputSources } from "./config-type.ts"; import { contentTypes } from "./content-type.ts"; import { - ClientMethod, - SomeMethod, + type ClientMethod, + type SomeMethod, isMethod, - Method, - CORSMethod, + type Method, + type CORSMethod, } from "./method.ts"; -import { NormalizedResponse } from "./api-response.ts"; +import type { NormalizedResponse } from "./api-response.ts"; /** @since zod 3.25.61 output type fixed */ export const emptySchema = z.object({}); diff --git a/express-zod-api/src/config-type.ts b/express-zod-api/src/config-type.ts index fd1cbd7e0..b6c22f9b5 100644 --- a/express-zod-api/src/config-type.ts +++ b/express-zod-api/src/config-type.ts @@ -1,14 +1,14 @@ import type compression from "compression"; -import { IRouter, Request, RequestHandler } from "express"; +import type { IRouter, Request, RequestHandler } from "express"; import type fileUpload from "express-fileupload"; -import { ServerOptions } from "node:https"; -import { BuiltinLoggerConfig } from "./builtin-logger.ts"; -import { AbstractEndpoint } from "./endpoint.ts"; -import { AbstractLogger, ActualLogger } from "./logger-helpers.ts"; -import { Method } from "./method.ts"; -import { AbstractResultHandler } from "./result-handler.ts"; -import { ListenOptions } from "node:net"; -import { GetLogger } from "./server-helpers.ts"; +import type { ServerOptions } from "node:https"; +import type { BuiltinLoggerConfig } from "./builtin-logger.ts"; +import type { AbstractEndpoint } from "./endpoint.ts"; +import type { AbstractLogger, ActualLogger } from "./logger-helpers.ts"; +import type { Method } from "./method.ts"; +import type { AbstractResultHandler } from "./result-handler.ts"; +import type { ListenOptions } from "node:net"; +import type { GetLogger } from "./server-helpers.ts"; export type InputSource = keyof Pick< Request, diff --git a/express-zod-api/src/deep-checks.ts b/express-zod-api/src/deep-checks.ts index a5417f22b..3acd302c6 100644 --- a/express-zod-api/src/deep-checks.ts +++ b/express-zod-api/src/deep-checks.ts @@ -5,9 +5,9 @@ import { ezDateInBrand } from "./date-in-schema.ts"; import { ezDateOutBrand } from "./date-out-schema.ts"; import { DeepCheckError } from "./errors.ts"; import { ezFormBrand } from "./form-schema.ts"; -import { IOSchema } from "./io-schema.ts"; +import type { IOSchema } from "./io-schema.ts"; import { getBrand } from "@express-zod-api/zod-plugin"; -import { FirstPartyKind } from "./schema-walker.ts"; +import type { FirstPartyKind } from "./schema-walker.ts"; import { ezUploadBrand } from "./upload-schema.ts"; import { ezRawBrand } from "./raw-schema.ts"; diff --git a/express-zod-api/src/depends-on-method.ts b/express-zod-api/src/depends-on-method.ts index 191d8c132..cf7e1daa4 100644 --- a/express-zod-api/src/depends-on-method.ts +++ b/express-zod-api/src/depends-on-method.ts @@ -1,6 +1,6 @@ import * as R from "ramda"; -import { AbstractEndpoint } from "./endpoint.ts"; -import { Method } from "./method.ts"; +import type { AbstractEndpoint } from "./endpoint.ts"; +import type { Method } from "./method.ts"; import { Routable } from "./routable.ts"; export class DependsOnMethod extends Routable { diff --git a/express-zod-api/src/diagnostics.ts b/express-zod-api/src/diagnostics.ts index bc69fb606..a2c9c3c01 100644 --- a/express-zod-api/src/diagnostics.ts +++ b/express-zod-api/src/diagnostics.ts @@ -1,11 +1,11 @@ import { z } from "zod"; import { responseVariants } from "./api-response.ts"; -import { FlatObject, getRoutePathParams } from "./common-helpers.ts"; +import { type FlatObject, getRoutePathParams } from "./common-helpers.ts"; import { contentTypes } from "./content-type.ts"; import { findJsonIncompatible } from "./deep-checks.ts"; import { AbstractEndpoint } from "./endpoint.ts"; import { flattenIO } from "./json-schema-helpers.ts"; -import { ActualLogger } from "./logger-helpers.ts"; +import type { ActualLogger } from "./logger-helpers.ts"; export class Diagnostics { #verifiedEndpoints = new WeakSet(); diff --git a/express-zod-api/src/documentation-helpers.ts b/express-zod-api/src/documentation-helpers.ts index 0416a8d8d..d72785f9c 100644 --- a/express-zod-api/src/documentation-helpers.ts +++ b/express-zod-api/src/documentation-helpers.ts @@ -1,49 +1,49 @@ import { - ExamplesObject, + type ExamplesObject, isReferenceObject, isSchemaObject, - MediaTypeObject, - OAuthFlowObject, - ParameterObject, - ReferenceObject, - RequestBodyObject, - ResponseObject, - SchemaObject, - SchemaObjectType, - SecurityRequirementObject, - SecuritySchemeObject, - TagObject, + type MediaTypeObject, + type OAuthFlowObject, + type ParameterObject, + type ReferenceObject, + type RequestBodyObject, + type ResponseObject, + type SchemaObject, + type SchemaObjectType, + type SecurityRequirementObject, + type SecuritySchemeObject, + type TagObject, } from "openapi3-ts/oas31"; import * as R from "ramda"; import { z } from "zod"; -import { NormalizedResponse, ResponseVariant } from "./api-response.ts"; +import type { NormalizedResponse, ResponseVariant } from "./api-response.ts"; import { ezBufferBrand } from "./buffer-schema.ts"; import { shouldHaveContent, - FlatObject, + type FlatObject, getRoutePathParams, getTransformedType, isObject, isSchema, makeCleanId, routePathParamsRegex, - Tag, + type Tag, ucFirst, } from "./common-helpers.ts"; -import { InputSource } from "./config-type.ts"; +import type { InputSource } from "./config-type.ts"; import { contentTypes } from "./content-type.ts"; import { ezDateInBrand } from "./date-in-schema.ts"; import { ezDateOutBrand } from "./date-out-schema.ts"; import { DocumentationError } from "./errors.ts"; -import { IOSchema } from "./io-schema.ts"; +import type { IOSchema } from "./io-schema.ts"; import { flattenIO } from "./json-schema-helpers.ts"; -import { Alternatives } from "./logical-container.ts"; +import type { Alternatives } from "./logical-container.ts"; import { getBrand } from "@express-zod-api/zod-plugin"; -import { ClientMethod } from "./method.ts"; -import { ProprietaryBrand } from "./proprietary-schemas.ts"; +import type { ClientMethod } from "./method.ts"; +import type { ProprietaryBrand } from "./proprietary-schemas.ts"; import { ezRawBrand } from "./raw-schema.ts"; -import { FirstPartyKind } from "./schema-walker.ts"; -import { Security } from "./security.ts"; +import type { FirstPartyKind } from "./schema-walker.ts"; +import type { Security } from "./security.ts"; import { ezUploadBrand } from "./upload-schema.ts"; import wellKnownHeaders from "./well-known-headers.json" with { type: "json" }; diff --git a/express-zod-api/src/documentation.ts b/express-zod-api/src/documentation.ts index 4454bdfcc..944f52c60 100644 --- a/express-zod-api/src/documentation.ts +++ b/express-zod-api/src/documentation.ts @@ -1,20 +1,20 @@ import { OpenApiBuilder, - OperationObject, - ReferenceObject, - ResponsesObject, - SchemaObject, - SecuritySchemeObject, - SecuritySchemeType, + type OperationObject, + type ReferenceObject, + type ResponsesObject, + type SchemaObject, + type SecuritySchemeObject, + type SecuritySchemeType, } from "openapi3-ts/oas31"; import * as R from "ramda"; import { responseVariants } from "./api-response.ts"; import { contentTypes } from "./content-type.ts"; import { DocumentationError } from "./errors.ts"; import { getInputSources, makeCleanId } from "./common-helpers.ts"; -import { CommonConfig } from "./config-type.ts"; +import type { CommonConfig } from "./config-type.ts"; import { processContainers } from "./logical-container.ts"; -import { ClientMethod } from "./method.ts"; +import type { ClientMethod } from "./method.ts"; import { depictBody, depictRequestParams, @@ -24,13 +24,13 @@ import { depictTags, ensureShortDescription, reformatParamsInPath, - IsHeader, + type IsHeader, nonEmpty, - BrandHandling, + type BrandHandling, depictRequest, } from "./documentation-helpers.ts"; -import { Routing } from "./routing.ts"; -import { OnEndpoint, walkRouting, withHead } from "./routing-walker.ts"; +import type { Routing } from "./routing.ts"; +import { type OnEndpoint, walkRouting, withHead } from "./routing-walker.ts"; type Component = | "positiveResponse" diff --git a/express-zod-api/src/endpoint.ts b/express-zod-api/src/endpoint.ts index 535a6fef8..fe21b2fc6 100644 --- a/express-zod-api/src/endpoint.ts +++ b/express-zod-api/src/endpoint.ts @@ -1,35 +1,38 @@ -import { Request, Response } from "express"; +import type { Request, Response } from "express"; import * as R from "ramda"; import { z, globalRegistry } from "zod"; -import { NormalizedResponse, ResponseVariant } from "./api-response.ts"; +import type { NormalizedResponse, ResponseVariant } from "./api-response.ts"; import { findRequestTypeDefiningSchema } from "./deep-checks.ts"; import { - FlatObject, + type FlatObject, getActualMethod, getInput, ensureError, isSchema, } from "./common-helpers.ts"; -import { CommonConfig } from "./config-type.ts"; +import type { CommonConfig } from "./config-type.ts"; import { InputValidationError, OutputValidationError, ResultHandlerError, } from "./errors.ts"; import { ezFormBrand } from "./form-schema.ts"; -import { IOSchema } from "./io-schema.ts"; +import type { IOSchema } from "./io-schema.ts"; import { lastResortHandler } from "./last-resort.ts"; -import { ActualLogger } from "./logger-helpers.ts"; -import { LogicalContainer } from "./logical-container.ts"; +import type { ActualLogger } from "./logger-helpers.ts"; +import type { LogicalContainer } from "./logical-container.ts"; import { getBrand } from "@express-zod-api/zod-plugin"; -import { ClientMethod, CORSMethod, Method, SomeMethod } from "./method.ts"; -import { AbstractMiddleware, ExpressMiddleware } from "./middleware.ts"; -import { ContentType } from "./content-type.ts"; +import type { ClientMethod, CORSMethod, Method, SomeMethod } from "./method.ts"; +import { type AbstractMiddleware, ExpressMiddleware } from "./middleware.ts"; +import type { ContentType } from "./content-type.ts"; import { ezRawBrand } from "./raw-schema.ts"; -import { DiscriminatedResult, pullResponseExamples } from "./result-helpers.ts"; +import { + type DiscriminatedResult, + pullResponseExamples, +} from "./result-helpers.ts"; import { Routable } from "./routable.ts"; -import { AbstractResultHandler } from "./result-handler.ts"; -import { Security } from "./security.ts"; +import type { AbstractResultHandler } from "./result-handler.ts"; +import type { Security } from "./security.ts"; import { ezUploadBrand } from "./upload-schema.ts"; export type Handler = (params: { diff --git a/express-zod-api/src/endpoints-factory.ts b/express-zod-api/src/endpoints-factory.ts index eebbc6385..04363ca13 100644 --- a/express-zod-api/src/endpoints-factory.ts +++ b/express-zod-api/src/endpoints-factory.ts @@ -1,21 +1,21 @@ -import { Request, Response } from "express"; +import type { Request, Response } from "express"; import { z } from "zod"; import { - EmptyObject, + type EmptyObject, emptySchema, - EmptySchema, - FlatObject, - Tag, + type EmptySchema, + type FlatObject, + type Tag, } from "./common-helpers.ts"; -import { Endpoint, Handler } from "./endpoint.ts"; +import { Endpoint, type Handler } from "./endpoint.ts"; import { - IOSchema, - FinalInputSchema, - Extension, + type IOSchema, + type FinalInputSchema, + type Extension, ensureExtension, makeFinalInputSchema, } from "./io-schema.ts"; -import { ClientMethod, Method } from "./method.ts"; +import type { ClientMethod, Method } from "./method.ts"; import { AbstractMiddleware, ExpressMiddleware, diff --git a/express-zod-api/src/errors.ts b/express-zod-api/src/errors.ts index 5bd0947b3..09bb748cc 100644 --- a/express-zod-api/src/errors.ts +++ b/express-zod-api/src/errors.ts @@ -1,6 +1,6 @@ import { z } from "zod"; import { getMessageFromError } from "./common-helpers.ts"; -import { OpenAPIContext } from "./documentation-helpers.ts"; +import type { OpenAPIContext } from "./documentation-helpers.ts"; import type { Method } from "./method.ts"; /** @desc An error related to the wrong Routing declaration */ diff --git a/express-zod-api/src/integration-base.ts b/express-zod-api/src/integration-base.ts index a80453b8a..3dfb160db 100644 --- a/express-zod-api/src/integration-base.ts +++ b/express-zod-api/src/integration-base.ts @@ -1,8 +1,8 @@ import * as R from "ramda"; import ts from "typescript"; -import { ResponseVariant } from "./api-response.ts"; +import type { ResponseVariant } from "./api-response.ts"; import { contentTypes } from "./content-type.ts"; -import { ClientMethod, clientMethods } from "./method.ts"; +import { type ClientMethod, clientMethods } from "./method.ts"; import type { makeEventSchema } from "./sse.ts"; import { accessModifiers, @@ -35,7 +35,7 @@ import { makePublicProperty, makeIndexed, makeMaybeAsync, - Typeable, + type Typeable, makeFnType, makeLiteralType, literally, diff --git a/express-zod-api/src/integration.ts b/express-zod-api/src/integration.ts index 98fe3cb54..bdc3d5cd5 100644 --- a/express-zod-api/src/integration.ts +++ b/express-zod-api/src/integration.ts @@ -1,7 +1,7 @@ import * as R from "ramda"; import ts from "typescript"; import { z } from "zod"; -import { ResponseVariant, responseVariants } from "./api-response.ts"; +import { type ResponseVariant, responseVariants } from "./api-response.ts"; import { IntegrationBase } from "./integration-base.ts"; import { f, @@ -16,13 +16,13 @@ import { } from "./typescript-api.ts"; import { shouldHaveContent, makeCleanId } from "./common-helpers.ts"; import { loadPeer } from "./peer-helpers.ts"; -import { Routing } from "./routing.ts"; -import { OnEndpoint, walkRouting, withHead } from "./routing-walker.ts"; -import { HandlingRules } from "./schema-walker.ts"; +import type { Routing } from "./routing.ts"; +import { type OnEndpoint, walkRouting, withHead } from "./routing-walker.ts"; +import type { HandlingRules } from "./schema-walker.ts"; import { zodToTs } from "./zts.ts"; -import { ZTSContext } from "./zts-helpers.ts"; +import type { ZTSContext } from "./zts-helpers.ts"; import type Prettier from "prettier"; -import { ClientMethod } from "./method.ts"; +import type { ClientMethod } from "./method.ts"; interface IntegrationParams { routing: Routing; diff --git a/express-zod-api/src/json-schema-helpers.ts b/express-zod-api/src/json-schema-helpers.ts index 4aec0da69..bbe050319 100644 --- a/express-zod-api/src/json-schema-helpers.ts +++ b/express-zod-api/src/json-schema-helpers.ts @@ -1,5 +1,5 @@ import * as R from "ramda"; -import { combinations, FlatObject, isObject } from "./common-helpers.ts"; +import { combinations, type FlatObject, isObject } from "./common-helpers.ts"; import type { z } from "zod"; const isJsonObjectSchema = ( diff --git a/express-zod-api/src/last-resort.ts b/express-zod-api/src/last-resort.ts index 0270b27d6..4dd852347 100644 --- a/express-zod-api/src/last-resort.ts +++ b/express-zod-api/src/last-resort.ts @@ -1,7 +1,7 @@ -import { Response } from "express"; +import type { Response } from "express"; import createHttpError, { isHttpError } from "http-errors"; -import { ResultHandlerError } from "./errors.ts"; -import { ActualLogger } from "./logger-helpers.ts"; +import type { ResultHandlerError } from "./errors.ts"; +import type { ActualLogger } from "./logger-helpers.ts"; import { getPublicErrorMessage } from "./result-helpers.ts"; interface LastResortHandlerParams { diff --git a/express-zod-api/src/middleware.ts b/express-zod-api/src/middleware.ts index e62034462..859917437 100644 --- a/express-zod-api/src/middleware.ts +++ b/express-zod-api/src/middleware.ts @@ -1,11 +1,11 @@ -import { NextFunction, Request, Response } from "express"; +import type { NextFunction, Request, Response } from "express"; import { z } from "zod"; -import { emptySchema, FlatObject } from "./common-helpers.ts"; +import { emptySchema, type FlatObject } from "./common-helpers.ts"; import { InputValidationError } from "./errors.ts"; -import { IOSchema } from "./io-schema.ts"; -import { LogicalContainer } from "./logical-container.ts"; -import { Security } from "./security.ts"; -import { ActualLogger } from "./logger-helpers.ts"; +import type { IOSchema } from "./io-schema.ts"; +import type { LogicalContainer } from "./logical-container.ts"; +import type { Security } from "./security.ts"; +import type { ActualLogger } from "./logger-helpers.ts"; type Handler = (params: { /** @desc The inputs from the enabled input sources validated against the input schema of the Middleware */ diff --git a/express-zod-api/src/result-handler.ts b/express-zod-api/src/result-handler.ts index a41cf18b8..03c4602fd 100644 --- a/express-zod-api/src/result-handler.ts +++ b/express-zod-api/src/result-handler.ts @@ -1,21 +1,21 @@ -import { Request, Response } from "express"; +import type { Request, Response } from "express"; import { globalRegistry, z } from "zod"; import { - ApiResponse, + type ApiResponse, defaultStatusCodes, - NormalizedResponse, + type NormalizedResponse, } from "./api-response.ts"; -import { FlatObject, isObject } from "./common-helpers.ts"; +import { type FlatObject, isObject } from "./common-helpers.ts"; import { contentTypes } from "./content-type.ts"; -import { IOSchema } from "./io-schema.ts"; -import { ActualLogger } from "./logger-helpers.ts"; +import type { IOSchema } from "./io-schema.ts"; +import type { ActualLogger } from "./logger-helpers.ts"; import { - DiscriminatedResult, + type DiscriminatedResult, ensureHttpError, getPublicErrorMessage, logServerError, normalize, - ResultSchema, + type ResultSchema, } from "./result-helpers.ts"; type Handler = ( diff --git a/express-zod-api/src/result-helpers.ts b/express-zod-api/src/result-helpers.ts index ba31af016..d55e5c85b 100644 --- a/express-zod-api/src/result-helpers.ts +++ b/express-zod-api/src/result-helpers.ts @@ -1,16 +1,16 @@ -import { Request } from "express"; +import type { Request } from "express"; import createHttpError, { HttpError, isHttpError } from "http-errors"; import * as R from "ramda"; import { globalRegistry, z } from "zod"; -import { NormalizedResponse, ResponseVariant } from "./api-response.ts"; +import type { NormalizedResponse, ResponseVariant } from "./api-response.ts"; import { combinations, - FlatObject, + type FlatObject, getMessageFromError, isProduction, } from "./common-helpers.ts"; import { InputValidationError, ResultHandlerError } from "./errors.ts"; -import { ActualLogger } from "./logger-helpers.ts"; +import type { ActualLogger } from "./logger-helpers.ts"; import type { LazyResult, Result } from "./result-handler.ts"; export type ResultSchema = diff --git a/express-zod-api/src/routable.ts b/express-zod-api/src/routable.ts index 8800157df..c4136ef5c 100644 --- a/express-zod-api/src/routable.ts +++ b/express-zod-api/src/routable.ts @@ -1,4 +1,4 @@ -import { Routing } from "./routing.ts"; +import type { Routing } from "./routing.ts"; export abstract class Routable { /** @desc Marks the route as deprecated (makes a copy of the endpoint) */ diff --git a/express-zod-api/src/routing-walker.ts b/express-zod-api/src/routing-walker.ts index 906f93721..1e0276daf 100644 --- a/express-zod-api/src/routing-walker.ts +++ b/express-zod-api/src/routing-walker.ts @@ -1,9 +1,9 @@ import { DependsOnMethod } from "./depends-on-method.ts"; import { AbstractEndpoint } from "./endpoint.ts"; import { RoutingError } from "./errors.ts"; -import { ClientMethod, isMethod, Method } from "./method.ts"; -import { Routing } from "./routing.ts"; -import { ServeStatic, StaticHandler } from "./serve-static.ts"; +import { type ClientMethod, isMethod, type Method } from "./method.ts"; +import type { Routing } from "./routing.ts"; +import { ServeStatic, type StaticHandler } from "./serve-static.ts"; export type OnEndpoint = ( method: M, diff --git a/express-zod-api/src/routing.ts b/express-zod-api/src/routing.ts index 6c85de88c..51b8c843e 100644 --- a/express-zod-api/src/routing.ts +++ b/express-zod-api/src/routing.ts @@ -1,15 +1,15 @@ -import { IRouter, RequestHandler } from "express"; +import type { IRouter, RequestHandler } from "express"; import createHttpError from "http-errors"; import { isProduction } from "./common-helpers.ts"; -import { CommonConfig } from "./config-type.ts"; -import { ContentType } from "./content-type.ts"; -import { DependsOnMethod } from "./depends-on-method.ts"; +import type { CommonConfig } from "./config-type.ts"; +import type { ContentType } from "./content-type.ts"; +import type { DependsOnMethod } from "./depends-on-method.ts"; import { Diagnostics } from "./diagnostics.ts"; -import { AbstractEndpoint } from "./endpoint.ts"; -import { CORSMethod, isMethod } from "./method.ts"; -import { OnEndpoint, walkRouting } from "./routing-walker.ts"; -import { ServeStatic } from "./serve-static.ts"; -import { GetLogger } from "./server-helpers.ts"; +import type { AbstractEndpoint } from "./endpoint.ts"; +import { type CORSMethod, isMethod } from "./method.ts"; +import { type OnEndpoint, walkRouting } from "./routing-walker.ts"; +import type { ServeStatic } from "./serve-static.ts"; +import type { GetLogger } from "./server-helpers.ts"; import * as R from "ramda"; /** diff --git a/express-zod-api/src/server-helpers.ts b/express-zod-api/src/server-helpers.ts index 1db70773c..fcda0371a 100644 --- a/express-zod-api/src/server-helpers.ts +++ b/express-zod-api/src/server-helpers.ts @@ -1,9 +1,9 @@ import type fileUpload from "express-fileupload"; import { loadPeer } from "./peer-helpers.ts"; -import { AbstractResultHandler } from "./result-handler.ts"; -import { ActualLogger } from "./logger-helpers.ts"; -import { CommonConfig, ServerConfig } from "./config-type.ts"; -import { ErrorRequestHandler, RequestHandler, Request } from "express"; +import type { AbstractResultHandler } from "./result-handler.ts"; +import type { ActualLogger } from "./logger-helpers.ts"; +import type { CommonConfig, ServerConfig } from "./config-type.ts"; +import type { ErrorRequestHandler, RequestHandler, Request } from "express"; import createHttpError from "http-errors"; import { lastResortHandler } from "./last-resort.ts"; import { ResultHandlerError } from "./errors.ts"; diff --git a/express-zod-api/src/server.ts b/express-zod-api/src/server.ts index 09e0b0c0a..46b8684b4 100644 --- a/express-zod-api/src/server.ts +++ b/express-zod-api/src/server.ts @@ -3,7 +3,7 @@ import type compression from "compression"; import http from "node:http"; import https from "node:https"; import { BuiltinLogger } from "./builtin-logger.ts"; -import { +import type { AppConfig, CommonConfig, HttpConfig, @@ -12,7 +12,7 @@ import { import { isLoggerInstance } from "./logger-helpers.ts"; import { loadPeer } from "./peer-helpers.ts"; import { defaultResultHandler } from "./result-handler.ts"; -import { Parsers, Routing, initRouting } from "./routing.ts"; +import { type Parsers, type Routing, initRouting } from "./routing.ts"; import { createLoggingMiddleware, createNotFoundHandler, diff --git a/express-zod-api/src/sse.ts b/express-zod-api/src/sse.ts index ab067bf5d..1198ef2c4 100644 --- a/express-zod-api/src/sse.ts +++ b/express-zod-api/src/sse.ts @@ -1,6 +1,6 @@ -import { Response } from "express"; +import type { Response } from "express"; import { z } from "zod"; -import { FlatObject } from "./common-helpers.ts"; +import type { FlatObject } from "./common-helpers.ts"; import { contentTypes } from "./content-type.ts"; import { EndpointsFactory } from "./endpoints-factory.ts"; import { Middleware } from "./middleware.ts"; diff --git a/express-zod-api/src/testing.ts b/express-zod-api/src/testing.ts index 6ca2177a3..cf947e48b 100644 --- a/express-zod-api/src/testing.ts +++ b/express-zod-api/src/testing.ts @@ -1,21 +1,21 @@ -import { Request, Response } from "express"; -import { ensureError, FlatObject, getInput } from "./common-helpers.ts"; -import { CommonConfig } from "./config-type.ts"; +import type { Request, Response } from "express"; +import { ensureError, type FlatObject, getInput } from "./common-helpers.ts"; +import type { CommonConfig } from "./config-type.ts"; import { AbstractEndpoint } from "./endpoint.ts"; import { - AbstractLogger, - ActualLogger, + type AbstractLogger, + type ActualLogger, isSeverity, - Severity, + type Severity, } from "./logger-helpers.ts"; import { contentTypes } from "./content-type.ts"; import { createRequest, - RequestOptions, + type RequestOptions, createResponse, - ResponseOptions, + type ResponseOptions, } from "node-mocks-http"; -import { AbstractMiddleware } from "./middleware.ts"; +import type { AbstractMiddleware } from "./middleware.ts"; import { defaultResultHandler } from "./result-handler.ts"; export const makeRequestMock = (props?: REQ) => diff --git a/express-zod-api/src/zts-helpers.ts b/express-zod-api/src/zts-helpers.ts index 9db9a7f23..e9a545739 100644 --- a/express-zod-api/src/zts-helpers.ts +++ b/express-zod-api/src/zts-helpers.ts @@ -1,6 +1,6 @@ import type ts from "typescript"; -import { FlatObject } from "./common-helpers.ts"; -import { SchemaHandler } from "./schema-walker.ts"; +import type { FlatObject } from "./common-helpers.ts"; +import type { SchemaHandler } from "./schema-walker.ts"; export interface ZTSContext extends FlatObject { isResponse: boolean; diff --git a/express-zod-api/src/zts.ts b/express-zod-api/src/zts.ts index b860ae38e..566b16300 100644 --- a/express-zod-api/src/zts.ts +++ b/express-zod-api/src/zts.ts @@ -6,16 +6,20 @@ import { getTransformedType, isSchema } from "./common-helpers.ts"; import { ezDateInBrand } from "./date-in-schema.ts"; import { ezDateOutBrand } from "./date-out-schema.ts"; import { hasCycle } from "./deep-checks.ts"; -import { ProprietaryBrand } from "./proprietary-schemas.ts"; -import { ezRawBrand, RawSchema } from "./raw-schema.ts"; -import { FirstPartyKind, HandlingRules, walkSchema } from "./schema-walker.ts"; +import type { ProprietaryBrand } from "./proprietary-schemas.ts"; +import { ezRawBrand, type RawSchema } from "./raw-schema.ts"; +import { + type FirstPartyKind, + type HandlingRules, + walkSchema, +} from "./schema-walker.ts"; import { ensureTypeNode, makeInterfaceProp, makeLiteralType, makeUnion, } from "./typescript-api.ts"; -import { Producer, ZTSContext } from "./zts-helpers.ts"; +import type { Producer, ZTSContext } from "./zts-helpers.ts"; const { factory: f } = ts; diff --git a/tsconfig.json b/tsconfig.json index 72b22292a..31ebc6322 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,6 +8,7 @@ "noImplicitOverride": true, "noUncheckedSideEffectImports": true, "resolveJsonModule": true, + "verbatimModuleSyntax": true, "types": ["vitest/globals"] } } From 59281bf5a8d4814697b338d7ed3474123b5dca21 Mon Sep 17 00:00:00 2001 From: Anna Bocharova Date: Sat, 4 Oct 2025 15:46:49 +0200 Subject: [PATCH 2/6] Adjusting framework tests. --- express-zod-api/tests/builtin-logger.spec.ts | 5 ++++- express-zod-api/tests/common-helpers.spec.ts | 6 +++--- express-zod-api/tests/config-type.spec.ts | 2 +- express-zod-api/tests/deep-checks.spec.ts | 2 +- express-zod-api/tests/documentation-helpers.spec.ts | 4 ++-- express-zod-api/tests/documentation.spec.ts | 4 ++-- express-zod-api/tests/endpoints-factory.spec.ts | 4 ++-- express-zod-api/tests/index.spec.ts | 4 ++-- express-zod-api/tests/integration.spec.ts | 2 +- express-zod-api/tests/io-schema.spec.ts | 2 +- express-zod-api/tests/logger-helpers.spec.ts | 4 ++-- express-zod-api/tests/method.spec.ts | 8 ++++---- express-zod-api/tests/result-handler.spec.ts | 4 ++-- express-zod-api/tests/routing.spec.ts | 2 +- express-zod-api/tests/server-helpers.spec.ts | 4 ++-- express-zod-api/tests/server.spec.ts | 4 ++-- express-zod-api/tests/sse.spec.ts | 4 ++-- express-zod-api/tests/system.spec.ts | 2 +- express-zod-api/tests/testing.spec.ts | 2 +- express-zod-api/tests/zts.spec.ts | 2 +- 20 files changed, 37 insertions(+), 34 deletions(-) diff --git a/express-zod-api/tests/builtin-logger.spec.ts b/express-zod-api/tests/builtin-logger.spec.ts index bb34e1d52..2e1e5213b 100644 --- a/express-zod-api/tests/builtin-logger.spec.ts +++ b/express-zod-api/tests/builtin-logger.spec.ts @@ -1,5 +1,8 @@ import { performance } from "node:perf_hooks"; -import { BuiltinLogger, BuiltinLoggerConfig } from "../src/builtin-logger.ts"; +import { + BuiltinLogger, + type BuiltinLoggerConfig, +} from "../src/builtin-logger.ts"; describe("BuiltinLogger", () => { beforeEach(() => { diff --git a/express-zod-api/tests/common-helpers.spec.ts b/express-zod-api/tests/common-helpers.spec.ts index 15061b97c..e82fac96a 100644 --- a/express-zod-api/tests/common-helpers.spec.ts +++ b/express-zod-api/tests/common-helpers.spec.ts @@ -10,13 +10,13 @@ import { shouldHaveContent, getInputSources, emptySchema, - EmptySchema, - EmptyObject, + type EmptySchema, + type EmptyObject, } from "../src/common-helpers.ts"; import { z } from "zod"; import { makeRequestMock } from "../src/testing.ts"; import { methods } from "../src/method.ts"; -import { CommonConfig, InputSources } from "../src/config-type.ts"; +import type { CommonConfig, InputSources } from "../src/config-type.ts"; describe("Common Helpers", () => { describe("emptySchema", () => { diff --git a/express-zod-api/tests/config-type.spec.ts b/express-zod-api/tests/config-type.spec.ts index 6dd62d467..e45f2320f 100644 --- a/express-zod-api/tests/config-type.spec.ts +++ b/express-zod-api/tests/config-type.spec.ts @@ -1,4 +1,4 @@ -import { Express, IRouter } from "express"; +import type { Express, IRouter } from "express"; import { createConfig } from "../src/index.ts"; describe("ConfigType", () => { diff --git a/express-zod-api/tests/deep-checks.spec.ts b/express-zod-api/tests/deep-checks.spec.ts index 19d3f9ed6..caf22e1a1 100644 --- a/express-zod-api/tests/deep-checks.spec.ts +++ b/express-zod-api/tests/deep-checks.spec.ts @@ -1,4 +1,4 @@ -import { UploadedFile } from "express-fileupload"; +import type { UploadedFile } from "express-fileupload"; import { z } from "zod"; import { ez } from "../src/index.ts"; import { findNestedSchema, hasCycle } from "../src/deep-checks.ts"; diff --git a/express-zod-api/tests/documentation-helpers.spec.ts b/express-zod-api/tests/documentation-helpers.spec.ts index 4e25945ac..d8ebe5cf6 100644 --- a/express-zod-api/tests/documentation-helpers.spec.ts +++ b/express-zod-api/tests/documentation-helpers.spec.ts @@ -1,9 +1,9 @@ -import { SchemaObject } from "openapi3-ts/oas31"; +import type { SchemaObject } from "openapi3-ts/oas31"; import * as R from "ramda"; import { z } from "zod"; import { ez } from "../src/index.ts"; import { - OpenAPIContext, + type OpenAPIContext, depictRequestParams, depictSecurity, depictSecurityRefs, diff --git a/express-zod-api/tests/documentation.spec.ts b/express-zod-api/tests/documentation.spec.ts index eb2ea79f7..f9b53ae1c 100644 --- a/express-zod-api/tests/documentation.spec.ts +++ b/express-zod-api/tests/documentation.spec.ts @@ -9,8 +9,8 @@ import { defaultEndpointsFactory, ez, ResultHandler, - Depicter, - Method, + type Depicter, + type Method, } from "../src/index.ts"; import { contentTypes } from "../src/content-type.ts"; import { z } from "zod"; diff --git a/express-zod-api/tests/endpoints-factory.spec.ts b/express-zod-api/tests/endpoints-factory.spec.ts index b2432447d..b30c0bc20 100644 --- a/express-zod-api/tests/endpoints-factory.spec.ts +++ b/express-zod-api/tests/endpoints-factory.spec.ts @@ -1,4 +1,4 @@ -import { RequestHandler } from "express"; +import type { RequestHandler } from "express"; import createHttpError from "http-errors"; import { expectTypeOf } from "vitest"; import { @@ -8,7 +8,7 @@ import { ResultHandler, testMiddleware, } from "../src/index.ts"; -import { EmptyObject } from "../src/common-helpers.ts"; +import type { EmptyObject } from "../src/common-helpers.ts"; import { Endpoint } from "../src/endpoint.ts"; import { z } from "zod"; diff --git a/express-zod-api/tests/index.spec.ts b/express-zod-api/tests/index.spec.ts index c27db2249..7090b8e16 100644 --- a/express-zod-api/tests/index.spec.ts +++ b/express-zod-api/tests/index.spec.ts @@ -1,8 +1,8 @@ -import { IRouter } from "express"; +import type { IRouter } from "express"; import ts from "typescript"; import { z } from "zod"; import * as entrypoint from "../src/index.ts"; -import { +import type { ApiResponse, AppConfig, BasicSecurity, diff --git a/express-zod-api/tests/integration.spec.ts b/express-zod-api/tests/integration.spec.ts index dcc267e8e..9ed9e67a1 100644 --- a/express-zod-api/tests/integration.spec.ts +++ b/express-zod-api/tests/integration.spec.ts @@ -3,7 +3,7 @@ import { z } from "zod"; import { EndpointsFactory, Integration, - Producer, + type Producer, defaultEndpointsFactory, ResultHandler, } from "../src/index.ts"; diff --git a/express-zod-api/tests/io-schema.spec.ts b/express-zod-api/tests/io-schema.spec.ts index ed68a5919..5bb40667e 100644 --- a/express-zod-api/tests/io-schema.spec.ts +++ b/express-zod-api/tests/io-schema.spec.ts @@ -1,5 +1,5 @@ import { z } from "zod"; -import { IOSchema, ez } from "../src/index.ts"; +import { type IOSchema, ez } from "../src/index.ts"; import { makeFinalInputSchema, ensureExtension } from "../src/io-schema.ts"; describe("I/O Schema and related helpers", () => { diff --git a/express-zod-api/tests/logger-helpers.spec.ts b/express-zod-api/tests/logger-helpers.spec.ts index 889af56a9..8868e5a9a 100644 --- a/express-zod-api/tests/logger-helpers.spec.ts +++ b/express-zod-api/tests/logger-helpers.spec.ts @@ -1,7 +1,7 @@ import { BuiltinLogger } from "../src/index.ts"; -import { BuiltinLoggerConfig } from "../src/builtin-logger.ts"; +import type { BuiltinLoggerConfig } from "../src/builtin-logger.ts"; import { - AbstractLogger, + type AbstractLogger, isLoggerInstance, isSeverity, isHidden, diff --git a/express-zod-api/tests/method.spec.ts b/express-zod-api/tests/method.spec.ts index e10042356..029f13f25 100644 --- a/express-zod-api/tests/method.spec.ts +++ b/express-zod-api/tests/method.spec.ts @@ -2,11 +2,11 @@ import * as R from "ramda"; import { isMethod, methods, - Method, + type Method, clientMethods, - ClientMethod, - SomeMethod, - CORSMethod, + type ClientMethod, + type SomeMethod, + type CORSMethod, } from "../src/method.ts"; describe("Method", () => { diff --git a/express-zod-api/tests/result-handler.spec.ts b/express-zod-api/tests/result-handler.spec.ts index 8585ff412..f48844de8 100644 --- a/express-zod-api/tests/result-handler.spec.ts +++ b/express-zod-api/tests/result-handler.spec.ts @@ -1,4 +1,4 @@ -import { Response } from "express"; +import type { Response } from "express"; import createHttpError from "http-errors"; import { z } from "zod"; import { @@ -8,7 +8,7 @@ import { ResultHandler, } from "../src/index.ts"; import { ResultHandlerError } from "../src/errors.ts"; -import { AbstractResultHandler, Result } from "../src/result-handler.ts"; +import { AbstractResultHandler, type Result } from "../src/result-handler.ts"; import { makeLoggerMock, makeRequestMock, diff --git a/express-zod-api/tests/routing.spec.ts b/express-zod-api/tests/routing.spec.ts index 21ed597a1..598c2523f 100644 --- a/express-zod-api/tests/routing.spec.ts +++ b/express-zod-api/tests/routing.spec.ts @@ -8,7 +8,7 @@ import { z } from "zod"; import { DependsOnMethod, EndpointsFactory, - Routing, + type Routing, ServeStatic, defaultResultHandler, ez, diff --git a/express-zod-api/tests/server-helpers.spec.ts b/express-zod-api/tests/server-helpers.spec.ts index ffd78fe48..7ac8b144d 100644 --- a/express-zod-api/tests/server-helpers.spec.ts +++ b/express-zod-api/tests/server-helpers.spec.ts @@ -14,11 +14,11 @@ import { localsID, } from "../src/server-helpers.ts"; import { - CommonConfig, + type CommonConfig, defaultResultHandler, ResultHandler, } from "../src/index.ts"; -import { Request } from "express"; +import type { Request } from "express"; import { makeLoggerMock, makeRequestMock, diff --git a/express-zod-api/tests/server.spec.ts b/express-zod-api/tests/server.spec.ts index 398e0786b..a0f94b528 100644 --- a/express-zod-api/tests/server.spec.ts +++ b/express-zod-api/tests/server.spec.ts @@ -15,10 +15,10 @@ import { } from "./http-mock.ts"; import { z } from "zod"; import { - AppConfig, + type AppConfig, BuiltinLogger, EndpointsFactory, - ServerConfig, + type ServerConfig, attachRouting, createServer, defaultResultHandler, diff --git a/express-zod-api/tests/sse.spec.ts b/express-zod-api/tests/sse.spec.ts index 5260defb1..cacca56b8 100644 --- a/express-zod-api/tests/sse.spec.ts +++ b/express-zod-api/tests/sse.spec.ts @@ -1,6 +1,6 @@ import { z } from "zod"; import { - FlatObject, + type FlatObject, Middleware, ResultHandler, testEndpoint, @@ -9,7 +9,7 @@ import { EndpointsFactory, } from "../src/index.ts"; import { - Emitter, + type Emitter, ensureStream, formatEvent, makeEventSchema, diff --git a/express-zod-api/tests/system.spec.ts b/express-zod-api/tests/system.spec.ts index 7b76d19ed..ea0a7c39a 100644 --- a/express-zod-api/tests/system.spec.ts +++ b/express-zod-api/tests/system.spec.ts @@ -5,7 +5,7 @@ import { readFile } from "node:fs/promises"; import { z } from "zod"; import { EndpointsFactory, - Method, + type Method, createConfig, createServer, defaultResultHandler, diff --git a/express-zod-api/tests/testing.spec.ts b/express-zod-api/tests/testing.spec.ts index 65b9e4841..e4802a848 100644 --- a/express-zod-api/tests/testing.spec.ts +++ b/express-zod-api/tests/testing.spec.ts @@ -1,6 +1,6 @@ import { z } from "zod"; import { - CommonConfig, + type CommonConfig, defaultEndpointsFactory, Middleware, ResultHandler, diff --git a/express-zod-api/tests/zts.spec.ts b/express-zod-api/tests/zts.spec.ts index 63fa4bbc8..65faea3b6 100644 --- a/express-zod-api/tests/zts.spec.ts +++ b/express-zod-api/tests/zts.spec.ts @@ -3,7 +3,7 @@ import { z } from "zod"; import { ez } from "../src/index.ts"; import { f, printNode } from "../src/typescript-api.ts"; import { zodToTs } from "../src/zts.ts"; -import { ZTSContext } from "../src/zts-helpers.ts"; +import type { ZTSContext } from "../src/zts-helpers.ts"; describe("zod-to-ts", () => { const printNodeTest = (node: ts.Node) => From 394315bd45bb051c161b4ba88d2f6068ab5dc104 Mon Sep 17 00:00:00 2001 From: Anna Bocharova Date: Sat, 4 Oct 2025 15:49:14 +0200 Subject: [PATCH 3/6] Adjusting example workspace. --- example/middlewares.ts | 2 +- example/routing.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/middlewares.ts b/example/middlewares.ts index e3b68021f..461f8a545 100644 --- a/example/middlewares.ts +++ b/example/middlewares.ts @@ -1,7 +1,7 @@ import createHttpError from "http-errors"; import assert from "node:assert/strict"; import { z } from "zod"; -import { Method, Middleware } from "express-zod-api"; +import { type Method, Middleware } from "express-zod-api"; export const authMiddleware = new Middleware({ security: { diff --git a/example/routing.ts b/example/routing.ts index 0d9ef98a7..4a576867b 100644 --- a/example/routing.ts +++ b/example/routing.ts @@ -1,4 +1,4 @@ -import { DependsOnMethod, Routing, ServeStatic } from "express-zod-api"; +import { DependsOnMethod, type Routing, ServeStatic } from "express-zod-api"; import { rawAcceptingEndpoint } from "./endpoints/accept-raw.ts"; import { createUserEndpoint } from "./endpoints/create-user.ts"; import { deleteUserEndpoint } from "./endpoints/delete-user.ts"; From 9c25776fa636c9768c88418f20d92eb6ca121901 Mon Sep 17 00:00:00 2001 From: Anna Bocharova Date: Sat, 4 Oct 2025 15:51:53 +0200 Subject: [PATCH 4/6] Revert "Adjusting example workspace." This reverts commit 394315bd45bb051c161b4ba88d2f6068ab5dc104. --- example/middlewares.ts | 2 +- example/routing.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/middlewares.ts b/example/middlewares.ts index 461f8a545..e3b68021f 100644 --- a/example/middlewares.ts +++ b/example/middlewares.ts @@ -1,7 +1,7 @@ import createHttpError from "http-errors"; import assert from "node:assert/strict"; import { z } from "zod"; -import { type Method, Middleware } from "express-zod-api"; +import { Method, Middleware } from "express-zod-api"; export const authMiddleware = new Middleware({ security: { diff --git a/example/routing.ts b/example/routing.ts index 4a576867b..0d9ef98a7 100644 --- a/example/routing.ts +++ b/example/routing.ts @@ -1,4 +1,4 @@ -import { DependsOnMethod, type Routing, ServeStatic } from "express-zod-api"; +import { DependsOnMethod, Routing, ServeStatic } from "express-zod-api"; import { rawAcceptingEndpoint } from "./endpoints/accept-raw.ts"; import { createUserEndpoint } from "./endpoints/create-user.ts"; import { deleteUserEndpoint } from "./endpoints/delete-user.ts"; From 9f0559e33aa0fe30a89d25187753adccaef5ed3a Mon Sep 17 00:00:00 2001 From: Anna Bocharova Date: Sat, 4 Oct 2025 19:51:56 +0200 Subject: [PATCH 5/6] Reapply "Adjusting example workspace." This reverts commit 9c25776fa636c9768c88418f20d92eb6ca121901. --- example/middlewares.ts | 2 +- example/routing.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/middlewares.ts b/example/middlewares.ts index e3b68021f..461f8a545 100644 --- a/example/middlewares.ts +++ b/example/middlewares.ts @@ -1,7 +1,7 @@ import createHttpError from "http-errors"; import assert from "node:assert/strict"; import { z } from "zod"; -import { Method, Middleware } from "express-zod-api"; +import { type Method, Middleware } from "express-zod-api"; export const authMiddleware = new Middleware({ security: { diff --git a/example/routing.ts b/example/routing.ts index 0d9ef98a7..4a576867b 100644 --- a/example/routing.ts +++ b/example/routing.ts @@ -1,4 +1,4 @@ -import { DependsOnMethod, Routing, ServeStatic } from "express-zod-api"; +import { DependsOnMethod, type Routing, ServeStatic } from "express-zod-api"; import { rawAcceptingEndpoint } from "./endpoints/accept-raw.ts"; import { createUserEndpoint } from "./endpoints/create-user.ts"; import { deleteUserEndpoint } from "./endpoints/delete-user.ts"; From 8a7966c74b80091e14ae1d9ee39e8f25746d1d86 Mon Sep 17 00:00:00 2001 From: Anna Bocharova Date: Sat, 4 Oct 2025 19:56:01 +0200 Subject: [PATCH 6/6] Adjusting issue 952 test. --- README.md | 2 +- issue952-test/tags.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2ac4b428d..1bc65ea37 100644 --- a/README.md +++ b/README.md @@ -245,7 +245,7 @@ const helloWorldEndpoint = defaultEndpointsFactory.build({ Connect your endpoint to the `/v1/hello` route: ```ts -import { Routing } from "express-zod-api"; +import type { Routing } from "express-zod-api"; const routing: Routing = { v1: { diff --git a/issue952-test/tags.ts b/issue952-test/tags.ts index ff08fa0dc..5ef658b9e 100644 --- a/issue952-test/tags.ts +++ b/issue952-test/tags.ts @@ -1,6 +1,6 @@ import { defaultEndpointsFactory, - TagOverrides, + type TagOverrides, Documentation, } from "express-zod-api";