feat: utilize typescript in Vue 3 example files

This commit is contained in:
Blaine Bublitz 2021-02-05 14:37:14 -07:00
parent da695b1a42
commit 0e607c6da1
4 changed files with 5 additions and 5 deletions

View File

@ -2,7 +2,7 @@
<button type="button" :class="classes" @click="onClick" :style="style">{{ label }}</button>
</template>
<script>
<script lang="typescript">
import './button.css';
import { reactive, computed } from 'vue';
@ -32,7 +32,7 @@ export default {
emits: ['click'],
setup(props, { emit }) {
setup(props: any, { emit }: any) {
props = reactive(props);
return {
classes: computed(() => ({

View File

@ -29,7 +29,7 @@
</header>
</template>
<script>
<script lang="typescript">
import './header.css';
import MyButton from './Button.vue';

View File

@ -58,7 +58,7 @@
</article>
</template>
<script>
<script lang="typescript">
import './page.css';
import MyHeader from './Header.vue';

View File

@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"module": "commonjs",
"strict": true,
"jsx": "preserve",
"importHelpers": true,