Skip to content

Commit 547b60c

Browse files
committed
wip [skip ci]
1 parent acd0e86 commit 547b60c

File tree

3 files changed

+29
-5
lines changed

3 files changed

+29
-5
lines changed

packages/runtime-core/src/apiDefineComponent.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ type InferComponentOptions<T> = T &
173173
// MakeDefaultsOptional - if TypeProps is provided, set to false to use
174174
// user props types verbatim
175175
unknown extends TypeProps ? true : false,
176+
{},
176177
{}, // InjectOptions
177178
Slots & {},
178179
Exposed & string,
@@ -311,6 +312,7 @@ export function defineComponent<
311312
{}, // PublicProps
312313
{}, // Defaults
313314
false,
315+
{},
314316
InjectOptions,
315317
Slots,
316318
Exposed,

packages/runtime-core/src/componentOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ import {
8080
import type { OptionMergeFunction } from './apiCreateApp'
8181
import { LifecycleHooks } from './enums'
8282
import type { SlotsType } from './componentSlots'
83-
import { ComponentTypeEmits, normalizePropsOrEmits } from './apiSetupHelpers'
83+
import { type ComponentTypeEmits, normalizePropsOrEmits } from './apiSetupHelpers'
8484
import { markAsyncBoundary } from './helpers/useId'
8585

8686
/**

packages/runtime-core/src/componentPublicInstance.ts

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import {
3535
} from '@vue/reactivity'
3636
import {
3737
type ComponentInjectOptions,
38+
type ComponentOptionsBase,
3839
type ComponentProvideOptions,
3940
type ComputedOptions,
4041
type ExtractComputedReturns,
@@ -174,6 +175,25 @@ export type CreateComponentPublicInstanceWithMixins<
174175
PublicProps,
175176
PublicDefaults,
176177
MakeDefaultsOptional,
178+
ComponentOptionsBase<
179+
P,
180+
B,
181+
D,
182+
C,
183+
M,
184+
Mixin,
185+
Extends,
186+
E,
187+
string,
188+
Defaults,
189+
{},
190+
string,
191+
S,
192+
LC,
193+
Directives,
194+
Exposed,
195+
Provide
196+
>,
177197
I,
178198
S,
179199
Exposed,
@@ -198,6 +218,7 @@ export type ComponentPublicInstance<
198218
PublicProps = {},
199219
Defaults = {},
200220
MakeDefaultsOptional extends boolean = false,
221+
Options = {},
201222
I extends ComponentInjectOptions = {},
202223
S extends SlotsType = {},
203224
Exposed extends string = '',
@@ -217,10 +238,11 @@ export type ComponentPublicInstance<
217238
$host: Element | null
218239
$emit: EmitFn<E>
219240
$el: TypeEl
220-
$options: MergedComponentOptionsOverride & {
221-
// allow any custom options
222-
[key: string]: any
223-
}
241+
$options: Options &
242+
MergedComponentOptionsOverride & {
243+
// allow any custom options
244+
[key: string]: any
245+
}
224246
$forceUpdate: () => void
225247
$nextTick: typeof nextTick
226248
$watch<T extends string | ((...args: any) => any)>(

0 commit comments

Comments
 (0)