File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
packages/compiler-sfc/__tests__/compileScript Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -1434,6 +1434,29 @@ describe('resolveType', () => {
1434
1434
colsLg : [ 'Number' ] ,
1435
1435
} )
1436
1436
} )
1437
+
1438
+ test ( 'allowArbitraryExtensions' , ( ) => {
1439
+ const files = {
1440
+ '/foo.d.vue.ts' : 'export type Foo = number;' ,
1441
+ '/foo.vue' : '<template><div /></template>' ,
1442
+ '/bar.d.css.ts' : 'export type Bar = string;' ,
1443
+ '/bar.css' : ':root { --color: red; }' ,
1444
+ }
1445
+
1446
+ const { props } = resolve (
1447
+ `
1448
+ import { Foo } from './foo.vue'
1449
+ import { Bar } from './bar.css'
1450
+ defineProps<{ foo: Foo; bar: Bar }>()
1451
+ ` ,
1452
+ files ,
1453
+ )
1454
+
1455
+ expect ( props ) . toStrictEqual ( {
1456
+ foo : [ 'Number' ] ,
1457
+ bar : [ 'String' ] ,
1458
+ } )
1459
+ } )
1437
1460
} )
1438
1461
} )
1439
1462
You can’t perform that action at this time.
0 commit comments