Skip to content

Commit 06030fe

Browse files
authored
Fix type of React bootstrapScripts and bootstrapModules (static) (DefinitelyTyped#72431)
1 parent 72de7cf commit 06030fe

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

types/react-dom/static.d.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,16 @@ declare global {
2727
import { ReactNode } from "react";
2828
import { ErrorInfo } from "./client";
2929

30+
export type BootstrapScriptDescriptor = {
31+
src: string;
32+
integrity?: string | undefined;
33+
crossOrigin?: string | undefined;
34+
};
35+
3036
export interface PrerenderOptions {
3137
bootstrapScriptContent?: string;
32-
bootstrapScripts?: string[];
33-
bootstrapModules?: string[];
38+
bootstrapScripts?: Array<string | BootstrapScriptDescriptor>;
39+
bootstrapModules?: Array<string | BootstrapScriptDescriptor>;
3440
identifierPrefix?: string;
3541
namespaceURI?: string;
3642
onError?: (error: unknown, errorInfo: ErrorInfo) => string | void;

0 commit comments

Comments
 (0)