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

View File

@@ -6,9 +6,9 @@
* @module @deepseek-ai/dsh-llm/assembler
*/
import { CallId } from './brand'
import { assertNever } from './never'
import type { ContentBlock, FinishReason, Message, StreamChunk, TokenUsage } from './types'
import { CallId } from './brand.ts'
import { assertNever } from './never.ts'
import type { ContentBlock, FinishReason, Message, StreamChunk, TokenUsage } from './types.ts'
interface PartialBlock {
blockType: string

View File

@@ -7,14 +7,14 @@
*/
import { Context, Service } from 'cordis'
import type { GenerateOptions, StreamChunk } from './types'
import { HarnessError } from './error'
import type { GenerateOptions, StreamChunk } from './types.ts'
import { HarnessError } from './error.ts'
export * from './brand'
export * from './never'
export * from './error'
export * from './types'
export { BlockAssembler } from './assembler'
export * from './brand.ts'
export * from './never.ts'
export * from './error.ts'
export * from './types.ts'
export { BlockAssembler } from './assembler.ts'
declare module 'cordis' {
interface Context {

View File

@@ -19,7 +19,7 @@
* ```
*/
import type { CallId } from './brand'
import type { CallId } from './brand.ts'
/** Cache hint attached to a content block (provider-interpreted). */
export type CacheHint = 'ephemeral'