Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: use untransformed typescript type exports
  • Loading branch information
danielroe committed Feb 13, 2026
commit 3a241a4e2c651801c9d820f621227deeca9dd98b
2 changes: 1 addition & 1 deletion build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { rm } from "node:fs/promises";

export default defineBuildConfig({
externals: [
"typescript"
"#typescript"
],
hooks: {
async "build:done"() {
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@
},
"types": "./dist/index.d.mts",
"files": [
"dist"
"dist",
"typescript.d.mts"
],
"imports": {
"#typescript": "./typescript.d.mts"
},
"scripts": {
"build": "unbuild",
"dev": "vitest --typecheck",
Expand Down
2 changes: 1 addition & 1 deletion src/tsconfig/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { CompilerOptions, TypeAcquisition } from "typescript";
import type { CompilerOptions, TypeAcquisition } from "#typescript";

export type StripEnums<T extends Record<string, any>> = {
[K in keyof T]: T[K] extends boolean
Expand Down
3 changes: 3 additions & 0 deletions typescript.d.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import type ts from "typescript";
Copy link
Copy Markdown
Member

@pi0 pi0 Feb 16, 2026

Choose a reason for hiding this comment

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

Could we instead, uptate src/tsconfig to do non named import?

Testing this, it remains as-is in dist/.dts

import type * as ts from "typescript";

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done ✅

export type CompilerOptions = ts.CompilerOptions;
export type TypeAcquisition = ts.TypeAcquisition;