File size: 1,244 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
declare module 'private-next-rsc-action-encryption' {
  export function encryptActionBoundArgs(
    actionId: string,
    ...args: any[]
  ): Promise<string>

  export function decryptActionBoundArgs(
    actionId: string,
    encryptedPromise: Promise<string>
  ): Promise<any[]>
}

declare module 'private-next-rsc-server-reference' {
  export function registerServerReference<T extends (...args: any[]) => any>(
    reference: T,
    id: string,
    exportName: string | null
  ): T
}

declare module 'private-next-rsc-action-client-wrapper' {
  export function callServer(
    actionId: string,
    actionArgs: unknown[]
  ): Promise<unknown>

  export function findSourceMapURL(filename: string): string | null

  const createServerReference: (
    id: string,
    callServer: any,
    encodeFormAction?: any,
    findSourceMapURL?: any,
    functionName?: string
  ) => (...args: unknown[]) => Promise<unknown>
}

declare module 'private-next-rsc-action-validate' {
  function ensureServerEntryExports(actions: unknown[]): void
}

declare module 'private-next-rsc-cache-wrapper' {
  export function cache<TFn extends (...args: any[]) => Promise<any>>(
    kind: string,
    id: string,
    boundArgsLength: number,
    fn: TFn
  ): TFn
}