Skip to content

Instantly share code, notes, and snippets.

@potato4d
Created February 9, 2020 15:48
Show Gist options
  • Save potato4d/28b2ec5f3b59cb423e11c69adee7f7c3 to your computer and use it in GitHub Desktop.
Save potato4d/28b2ec5f3b59cb423e11c69adee7f7c3 to your computer and use it in GitHub Desktop.
Vue で TSX
import Vue, { VNode } from 'vue'
declare global {
namespace JSX {
interface Element extends VNode {}
interface ElementClass extends Vue {}
// interface IntrinsicElements {
// [element: string]: any
// }
}
}
/**
* Extends interfaces in Vue.js
*/
import 'vue-tsx-support/enable-check'
import 'vue-tsx-support/options/allow-unknown-props'
import 'vue-tsx-support/options/allow-element-unknown-attrs'
import 'vue-tsx-support/options/enable-html-attrs'
import 'vue-tsx-support/options/enable-nativeon'
import 'vue-tsx-support/options/enable-vue-router'
import Vue, { ComponentOptions } from 'vue'
declare module 'vue/types/vue' {
interface Vue {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment