Repository: vuejs/eslint-plugin-vue (js)

Issue:
`vue/require-valid-default-prop` false-positive when using TS prop definition
**Checklist**

- [x] I have tried restarting my IDE and the issue persists.
- [x] I have read the [FAQ](https://eslint.vuejs.org/user-guide/#faq) and my problem is not listed.

**Tell us about your environment**

- **ESLint version:** 8.5.0
- **eslint-plugin-vue version:** 8.2.0
- **Node version:** 14.17.0
- **Operating System:** macOS, Ubuntu 20

**Please show your full configuration:**
<!-- Paste content of your .eslintrc file -->
```json5
require("@rushstack/eslint-patch/modern-module-resolution");

module.exports = {
    root: true,
    extends: [
        "plugin:eslint-comments/recommended",
        "plugin:vue/vue3-strongly-recommended",
        "plugin:vue/vue3-recommended",
        "airbnb-typescript/base",
        "@vue/typescript/recommended",
        "@vue/prettier",
        "plugin:storybook/recommended",
        "plugin:markdown/recommended",
        "prettier",
    ],
    plugins: ["import"],
    parserOptions: {
        ecmaVersion: 2020,
        project: ["./tsconfig.json", "./tsconfig.vite-config.json"],
    },
    settings: {
        "import/parsers": {
            "@typescript-eslint/parser": [".ts", ".tsx"],
        },
    },
    env: {
        node: true,
        es2021: true,
        "vue/setup-compiler-macros": true,
    },
    rules: {
        "@typescript-eslint/quotes": ["error", "double", { allowTemplateLiterals: true, avoidEscape: true }],
        "max-len": ["error", 200, 4],
        "no-param-reassign": "off",
        "no-use-before-define": "off",
        "no-console": "error",
        "no-debugger": "error",
        "no-plusplus": "off",
        "@typescript-eslint/no-unused-vars": "error",
        "eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }],
        "vue/no-v-html": "error",
    },
    overrides: [
        {
            files: ["vite.config.ts", "tailwind.config.js"],
            rules: {
                "import/no-extraneous-dependencies": "off",
            },
        },
    ],
};
```

**What did you do?**	
```typescript
export interface SomePropInterface {
  someProp?: false | string;
}

withDefaults(defineProps<SomePropInterface>(), {
  someProp: false,
});
```

**What did you expect to happen?**

Assigning `false` to `someProp` as default value should be okay.

**What actually happened?**

`ESLint: Type of the default value for 'someProp' prop must be a string.(vue/require-valid-default-prop)`

**Repository to reproduce this issue**

I don't really think it's necessary but I will take the time to create one if really needed.

Pull request description:
Fix false positives for script setup with ts literal type in `vue/require-valid-default-prop`
fixes #1853

Patch:
diff --git a/lib/utils/ts-ast-utils.js b/lib/utils/ts-ast-utils.js
index dcc6c7cf..f5cf9691 100644
--- a/lib/utils/ts-ast-utils.js
+++ b/lib/utils/ts-ast-utils.js
@@ -260,23 +260,21 @@ function inferRuntimeType(context, node, checked = new Set()) {
       return ['Array']
 
     case 'TSLiteralType':
-      switch (node.literal.type) {
-        //@ts-ignore ?
-        case 'StringLiteral':
-          return ['String']
-        //@ts-ignore ?
-        case 'BooleanLiteral':
-          return ['Boolean']
-        //@ts-ignore ?
-        case 'NumericLiteral':
-        //@ts-ignore ?
-        // eslint-disable-next-line no-fallthrough
-        case 'BigIntLiteral':
-          return ['Number']
-        default:
-          return [`null`]
+      if (node.literal.type === 'Literal') {
+        switch (typeof node.literal.value) {
+          case 'boolean':
+            return ['Boolean']
+          case 'string':
+            return ['String']
+          case 'number':
+          case 'bigint':
+            return ['Number']
+        }
+        if (node.literal.value instanceof RegExp) {
+          return ['RegExp']
+        }
       }
-
+      return [`null`]
     case 'TSTypeReference':
       if (node.typeName.type === 'Identifier') {
         const variable = findVariable(context.getScope(), node.typeName.name)


Test patch:
diff --git a/tests/lib/rules/require-valid-default-prop.js b/tests/lib/rules/require-valid-default-prop.js
index e353edf5..c08a0403 100644
--- a/tests/lib/rules/require-valid-default-prop.js
+++ b/tests/lib/rules/require-valid-default-prop.js
@@ -252,6 +252,29 @@ ruleTester.run('require-valid-default-prop', rule, {
       parserOptions: { ecmaVersion: 6, sourceType: 'module' },
       parser: require.resolve('@typescript-eslint/parser'),
       errors: errorMessage('function')
+    },
+    {
+      // https://github.com/vuejs/eslint-plugin-vue/issues/1853
+      filename: 'test.vue',
+      code: `<script setup lang="ts">
+      export interface SomePropInterface {
+        someProp?: false | string;
+        str?: 'foo' | 'bar';
+        num?: 1 | 2;
+      }
+
+      withDefaults(defineProps<SomePropInterface>(), {
+        someProp: false,
+        str: 'foo',
+        num: 1
+      });
+      </script>`,
+      parserOptions: {
+        ecmaVersion: 6,
+        sourceType: 'module',
+        parser: require.resolve('@typescript-eslint/parser')
+      },
+      parser: require.resolve('vue-eslint-parser')
     }
   ],