Skip to content

Commit

Permalink
docs: add new options
Browse files Browse the repository at this point in the history
  • Loading branch information
so1ve committed Nov 7, 2023
1 parent 5f503c6 commit e8b77bc
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,24 @@ export default defineConfig({

### `tsconfigPath`

Path to your `tsconfig.json`.

- Type: `string`
- Default: `path.join(process.cwd(), "tsconfig.json")`

## 🖥️ How it works?
### `defineEmits`

Transform `defineEmits` or not.

- Type: `boolean`
- Default: `true`

### `defineProps`

Transform `defineProps` or not.

This plugin parses each SFC and traverse `<script setup lang="ts">`'s AST to find `defineProps`'s type argument and use TypeScript's type checker API to print the resolved type, then we overwrite the original type with the resolved type. Thus Vue's compiler can generate correct runtime code without parsing the complex types.
- Type: `boolean`
- Default: `true`

## 📝 License

Expand Down

0 comments on commit e8b77bc

Please sign in to comment.