Use explicit ts specifiers for declarations

Restore explicit .ts relative specifiers in source and enable rewriteRelativeImportExtensions so emitted JS uses .js while declarations keep explicit .ts specifiers. Add a NodeNext declaration-consumer gate to prevent extensionless declaration regressions.
This commit is contained in:
Tianyi Cui
2026-06-22 06:11:00 +08:00
parent 94e7355449
commit 07f4047ff0
56 changed files with 323 additions and 147 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
import { Message } from 'cordis'
import { ConsoleExporter as Base } from './shared'
import { ConsoleExporter as Base } from './shared.ts'
/** Re-export shared console exporter config and base implementation. */
export * from './shared'
export * from './shared.ts'
/** Browser console exporter that dispatches to native console methods. */
export class ConsoleExporter extends Base {
+2 -2
View File
@@ -1,10 +1,10 @@
import { Formatter } from 'cordis'
import { inspect } from 'node:util'
import supportsColor from 'supports-color'
import { ConsoleExporter as Base } from './shared'
import { ConsoleExporter as Base } from './shared.ts'
/** Re-export shared console exporter config and base implementation. */
export * from './shared'
export * from './shared.ts'
const inspectFormatter: Formatter = (value, target) => {
return inspect(value, { colors: !!target.colors, depth: Infinity, compact: true, breakLength: Infinity })