File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
packages/compiler-sfc/__tests__/compileScript Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -731,6 +731,22 @@ describe('resolveType', () => {
731
731
} )
732
732
} )
733
733
734
+ test ( 'TSMappedType with indexed access' , ( ) => {
735
+ const { props } = resolve (
736
+ `
737
+ type Prettify<T> = { [K in keyof T]: T[K] } & {}
738
+ type Side = 'top' | 'right' | 'bottom' | 'left'
739
+ type AlignedPlacement = \`\${Side}-\${Alignment}\`
740
+ type Alignment = 'start' | 'end'
741
+ type Placement = Prettify<Side | AlignedPlacement>
742
+ defineProps<{placement?: Placement}>()
743
+ ` ,
744
+ )
745
+ expect ( props ) . toStrictEqual ( {
746
+ placement : [ 'String' , 'Object' ] ,
747
+ } )
748
+ } )
749
+
734
750
describe ( 'type alias declaration' , ( ) => {
735
751
// #13240
736
752
test ( 'function type' , ( ) => {
You can’t perform that action at this time.
0 commit comments