Created
May 23, 2019 11:25
-
-
Save muthu32/fe8c0ae852210648895cb7297d2b7182 to your computer and use it in GitHub Desktop.
Vue typescript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Props { | |
tmp: string | |
alpha?: boolean | |
} | |
interface Events { | |
click: string | |
something: boolean | |
a: number | |
b: void | |
} | |
interface ScopedSlots { | |
s1?: { | |
click?: string | |
attr: boolean | |
} | |
s2?: { | |
s: null | |
} | |
s3: { | |
a: 'tst' | |
} | |
} | |
class Cmp extends Vue<Props, Events, ScopedSlots> { | |
created() { | |
console.log(this.$props.alpha) | |
this.$emit('a', 2) | |
this.$emit('b') | |
} | |
} | |
const h = <Cmp tmp="al" on={{ b: () => console.log() }} scopedSlots={{ s3: props => <a /> }} /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment