Skip to content

Commit 188fcf5

Browse files
committed
chore: improve type api
1 parent 61f2838 commit 188fcf5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/runtime/types.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,15 @@ export type RegistryScriptInput<
137137
scriptInput?: ScriptInput
138138
scriptOptions?: Omit<NuxtUseScriptOptions, Bundelable extends true ? '' : 'bundle' | Usable extends true ? '' : 'use'>
139139
})
140-
| (CanBypassOptions extends true ? {
140+
| Partial<InferInput<T>> & (
141+
CanBypassOptions extends true ? {
141142
/**
142143
* A unique key to use for the script, this can be used to load multiple of the same script with different options.
143144
*/
144-
key?: string
145-
scriptInput: Required<Pick<ScriptInput, 'src'>> & ScriptInput
146-
scriptOptions?: Omit<NuxtUseScriptOptions, Bundelable extends true ? '' : 'bundle' | Usable extends true ? '' : 'use'>
147-
} : never)
145+
key?: string
146+
scriptInput: Required<Pick<ScriptInput, 'src'>> & ScriptInput
147+
scriptOptions?: Omit<NuxtUseScriptOptions, Bundelable extends true ? '' : 'bundle' | Usable extends true ? '' : 'use'>
148+
} : never)
148149

149150
export interface RegistryScript {
150151
import?: Import // might just be a component

0 commit comments

Comments
 (0)