Skip to content

Commit 29a0945

Browse files
committed
Add testcase
1 parent fd93e56 commit 29a0945

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/lib/rules/require-valid-default-prop.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,14 @@ ruleTester.run('require-valid-default-prop', rule, {
258258
code: `<script setup lang="ts">
259259
export interface SomePropInterface {
260260
someProp?: false | string;
261+
str?: 'foo' | 'bar';
262+
num?: 1 | 2;
261263
}
262264
263265
withDefaults(defineProps<SomePropInterface>(), {
264266
someProp: false,
267+
str: 'foo',
268+
num: 1
265269
});
266270
</script>`,
267271
parserOptions: {

0 commit comments

Comments
 (0)