Skip to content

Conversation

@thallesdomician
Copy link
Contributor

@thallesdomician thallesdomician commented Nov 27, 2025

Description

This PR fixes a TypeScript compilation error in serialize-query-params package that occurs when projects use moduleResolution: "node".

Problem

The file packages/serialize-query-params/src/serialize.ts uses an absolute import:

import {EncodedValue} from "types";

This causes the following TypeScript error in consuming projects:

TS2307: Cannot find module 'types' or its corresponding type declarations.

Solution

Changed the import to use a relative path:

import {EncodedValue} from "./types";

Testing

  • ✅ All existing tests pass (npm test - 83 tests passed)
  • ✅ Build succeeds without errors (npm run build)
  • ✅ TypeScript compilation verified in consuming project

Impact

  • Breaking changes: None
  • Backward compatibility: Fully maintained
  • Affected packages: serialize-query-params@2.0.3

Changes the import statement from 'from "types"' to 'from "./types"'
to fix TypeScript compilation errors when using moduleResolution: "node".

The absolute import "types" causes TS2307 error: "Cannot find module 'types'
or its corresponding type declarations" in projects that consume this library.

This change maintains backward compatibility while fixing the module resolution
issue for TypeScript projects.
Copy link
Owner

@pbeshai pbeshai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@pbeshai pbeshai merged commit b908f3e into pbeshai:master Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants