Skip to content

Commit 9093918

Browse files
committed
chore: fix types
1 parent bfd267b commit 9093918

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

packages/plugin-rsc/examples/basic/src/routes/serialization/server.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export function TestSerializationServer() {
1010
let serialized = renderToReadableStream(original)
1111
// debug serialization
1212
if (0) {
13-
serialized = serialized
13+
serialized = (serialized as ReadableStream<Uint8Array<ArrayBuffer>>)
1414
.pipeThrough(new TextDecoderStream())
1515
.pipeThrough(
1616
new TransformStream({

packages/plugin-rsc/src/utils/encryption-runtime.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ export async function encryptActionBoundArgs(
1919
): Promise<string> {
2020
const serialized = renderToReadableStream(originalValue)
2121
const serializedBuffer = await concatArrayStream(serialized)
22-
return encryptBuffer(serializedBuffer, await getEncryptionKey())
22+
return encryptBuffer(
23+
serializedBuffer as BufferSource,
24+
await getEncryptionKey(),
25+
)
2326
}
2427

2528
export async function decryptActionBoundArgs(
@@ -37,7 +40,7 @@ const getEncryptionKey = /* #__PURE__ */ once(async () => {
3740
const resolved = await encryptionKeySource()
3841
const key = await crypto.subtle.importKey(
3942
'raw',
40-
fromBase64(resolved),
43+
fromBase64(resolved) as BufferSource,
4144
{
4245
name: 'AES-GCM',
4346
},

0 commit comments

Comments
 (0)