Skip to content

Fix ES module export incompatibility#2

Draft
Copilot wants to merge 2 commits intodevelopfrom
copilot/fix-export-convertjsontots
Draft

Fix ES module export incompatibility#2
Copilot wants to merge 2 commits intodevelopfrom
copilot/fix-export-convertjsontots

Conversation

Copy link

Copilot AI commented Jan 1, 2026

Package declares "type": "module" but TypeScript was compiling to CommonJS, causing ES module imports to fail with "does not provide an export named 'convertJsonToTs'".

Changes

  • Updated tsconfig.json module from CommonJS to ESNext

This aligns the build output with the package.json module type declaration.

// Now works correctly
import { convertJsonToTs } from '@typeweaver/json2ts';
const json = { name: "John", age: 30 };
const tsInterface = convertJsonToTs(json);
Original prompt

This section details on the original issue you should resolve

<issue_title>Does not provide an export named 'convertJsonToTs'</issue_title>
<issue_description>Steps to reproduce

import { convertJsonToTs } from '@typeweaver/json2ts';
const json = { name: "John", age: 30 };

const tsInterface = convertJsonToTs(json);
console.log(tsInterface);

Error

import { convertJsonToTs } from '@typeweaver/json2ts';
         ^^^^^^^^^^^^^^^
SyntaxError: The requested module '@typeweaver/json2ts' does not provide an export named 'convertJsonToTs'
```</issue_description>

<agent_instructions>Please look into this issue analyze implement test validate and raise PR </agent_instructions>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: thegdsks <39922405+thegdsks@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix export issue for convertJsonToTs Fix ES module export incompatibility Jan 1, 2026
Copilot AI requested a review from thegdsks January 1, 2026 02:50
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.

Does not provide an export named 'convertJsonToTs'

2 participants