Evan
Evan
TtRPC
Created by Evan on 9/4/2024 in #❓-help
Generating Types in v11
I am trying to generate types with tsc --declaration in order to import the type for the app router into a different project. Is this use case supported in v11? the app router changes to any type after upgrading, and the declaration files reference these "do-not-import" files
6 replies
TtRPC
Created by Evan on 9/3/2024 in #❓-help
TSC errors after upgrading to v11
Hello, I am trying to upgrade to v11 and encountering the following error:
tsc --declaration --emitDeclarationOnly


added 249 packages, and audited 523 packages in 3s

40 packages are looking for funding
run `npm fund` for details

found 0 vulnerabilities
node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/jsonl.d.ts:6:22 - error TS2304: Cannot find name 'ReadableStreamDefaultReader'.

6 getReader: () => ReadableStreamDefaultReader<Uint8Array>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/jsonl.d.ts:82:69 - error TS2315: Type 'ReadableStream' is not generic.

82 export declare function jsonlStreamProducer(opts: ProducerOptions): ReadableStream<Uint8Array>;
~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/jsonl.d.ts:103:21 - error TS2304: Cannot find name 'ReadableStreamDefaultController'.

103 controller: ReadableStreamDefaultController<ChunkData | StreamInterruptedError>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/sse.d.ts:45:76 - error TS2315: Type 'ReadableStream' is not generic.

45 export declare function sseStreamProducer(opts: SSEStreamProducerOptions): ReadableStream<string>;
~~~~~~~~~~~~~~~~~~~~~~

node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/sse.d.ts:57:11 - error TS2304: Cannot find name 'EventSource'.

57 from: EventSource;
~~~~~~~~~~~


Found 5 errors in 2 files.

Errors Files
3 node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/jsonl.d.ts:6
2 node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/sse.d.ts:45
tsc --declaration --emitDeclarationOnly


added 249 packages, and audited 523 packages in 3s

40 packages are looking for funding
run `npm fund` for details

found 0 vulnerabilities
node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/jsonl.d.ts:6:22 - error TS2304: Cannot find name 'ReadableStreamDefaultReader'.

6 getReader: () => ReadableStreamDefaultReader<Uint8Array>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/jsonl.d.ts:82:69 - error TS2315: Type 'ReadableStream' is not generic.

82 export declare function jsonlStreamProducer(opts: ProducerOptions): ReadableStream<Uint8Array>;
~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/jsonl.d.ts:103:21 - error TS2304: Cannot find name 'ReadableStreamDefaultController'.

103 controller: ReadableStreamDefaultController<ChunkData | StreamInterruptedError>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/sse.d.ts:45:76 - error TS2315: Type 'ReadableStream' is not generic.

45 export declare function sseStreamProducer(opts: SSEStreamProducerOptions): ReadableStream<string>;
~~~~~~~~~~~~~~~~~~~~~~

node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/sse.d.ts:57:11 - error TS2304: Cannot find name 'EventSource'.

57 from: EventSource;
~~~~~~~~~~~


Found 5 errors in 2 files.

Errors Files
3 node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/jsonl.d.ts:6
2 node_modules/@trpc/server/dist/unstable-core-do-not-import/stream/sse.d.ts:45
6 replies