generated from sapphiredev/sapphire-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: built types were wrong, causing inference issues
- Loading branch information
1 parent
ce4e323
commit 28e9247
Showing
5 changed files
with
102 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { copyFile, readFile, writeFile } from 'node:fs/promises'; | ||
|
||
const originalDTS = new URL('../dist/index.d.ts', import.meta.url); | ||
const originalDTSMap = new URL('../dist/index.d.ts.map', import.meta.url); | ||
|
||
const esmDTS = new URL('../dist/index.d.mts', import.meta.url); | ||
const esmDTSMap = new URL('../dist/index.d.mts.map', import.meta.url); | ||
|
||
await copyFile(originalDTS, esmDTS); | ||
|
||
const readMap = await readFile(originalDTSMap, 'utf-8'); | ||
const parsedMap = JSON.parse(readMap); | ||
parsedMap.file = 'index.d.mts'; | ||
|
||
await writeFile(esmDTSMap, JSON.stringify(parsedMap), 'utf-8'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters