File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -33,17 +33,18 @@ export type LoadableBaseOptions<P = {}> = LoadableGeneratedOptions & {
3333 ssr ?: boolean
3434}
3535
36- export type LoadableSuspenseOptions < P = { } > = {
37- loader : Loader < P >
36+ export type LoadableSuspenseOptions = {
3837 suspense ?: boolean
3938}
4039
4140export type LoadableOptions < P = { } > = LoadableBaseOptions < P >
4241
43- export type DynamicOptions < P = { } > = LoadableBaseOptions < P >
42+ export type DynamicOptions < P = { } > =
43+ | LoadableBaseOptions < P >
44+ | LoadableSuspenseOptions
4445
4546export type LoadableFn < P = { } > = (
46- opts : LoadableOptions < P > | LoadableSuspenseOptions < P >
47+ opts : LoadableOptions < P > | LoadableSuspenseOptions
4748) => React . ComponentType < P >
4849
4950export type LoadableComponent < P = { } > = React . ComponentType < P >
@@ -113,7 +114,7 @@ export default function dynamic<P = {}>(
113114 // Support for passing options, eg: dynamic(import('../hello-world'), {loading: () => <p>Loading something</p>})
114115 loadableOptions = { ...loadableOptions , ...options }
115116
116- const suspenseOptions = loadableOptions as LoadableSuspenseOptions < P >
117+ const suspenseOptions = loadableOptions as LoadableSuspenseOptions
117118 if ( ! process . env . __NEXT_CONCURRENT_FEATURES ) {
118119 // Error if react root is not enabled and `suspense` option is set to true
119120 if ( ! process . env . __NEXT_REACT_ROOT && suspenseOptions . suspense ) {
You can’t perform that action at this time.
0 commit comments