Files
test-repo/tests/format/vue/ts-event-binding/basic.vue
T
Sosuke Suzuki a4cba80dc0 Allow formatting for Vue template expression written in TypeScript (#12584)
* Support TS expression in vue SFC

* Add changelog

* Add `__ts_expression`

* Add `__vue_ts_expression`

* Add tests

* Do not use `ast.walk`

* Address review

* Add `__vue_ts_event_binding`

* Fix
2022-04-17 13:12:19 +09:00

11 lines
216 B
Vue

<script setup lang="ts">
let x = 1;
function log(...args) {
console.log(...args);
}
</script>
<template>
<div @click="if (x === 1 as number) { log('hello') } else { log('nonhello') };">{{ x }}</div>
</template>