|
|
@@ -11,7 +11,9 @@ import {
|
|
|
FunctionalComponent,
|
|
|
ComponentPublicInstance,
|
|
|
toRefs,
|
|
|
- IsAny
|
|
|
+ IsAny,
|
|
|
+ SetupContext,
|
|
|
+ expectAssignable
|
|
|
} from './index'
|
|
|
|
|
|
declare function extractComponentOptions<Props, RawBindings>(
|
|
|
@@ -476,3 +478,11 @@ describe('class', () => {
|
|
|
|
|
|
expectType<number>(props.foo)
|
|
|
})
|
|
|
+
|
|
|
+describe('SetupContext', () => {
|
|
|
+ describe('can assign', () => {
|
|
|
+ const wider: SetupContext<{ a: () => true; b: () => true }> = {} as any
|
|
|
+
|
|
|
+ expectAssignable<SetupContext<{ b: () => true }>>(wider)
|
|
|
+ })
|
|
|
+})
|