Browse Source

usefulness of `declare const`

master
pvincent 4 years ago
parent
commit
4276b90774
  1. 2
      src/App.vue
  2. 3
      src/main.ts
  3. 3
      src/shims-vue.d.ts

2
src/App.vue

@ -10,8 +10,6 @@
<script lang="ts">
import HelloWorld from "./components/HelloWorld.vue";
console.log(APP_TITLE);
console.log(APP_VERSION);
export default {
name: "App",
components: {

3
src/main.ts

@ -2,5 +2,6 @@ import { createApp } from 'vue'
import App from './App.vue'
import './index.css'
document.title = APP_TITLE
createApp(App).mount('#app')
document.title = APP_TITLE

3
src/shims-vue.d.ts

@ -3,3 +3,6 @@ declare module "*.vue" {
const Component: ReturnType<typeof defineComponent>
export default Component
}
declare const APP_VERSION: string
declare const APP_TITLE: string
Loading…
Cancel
Save