import { defineComponent, expectError, expectType } from './index' declare module '@vue/runtime-core' { interface ComponentCustomOptions { test?(n: number): void } interface ComponentCustomProperties { state: 'stopped' | 'running' } interface ComponentCustomProps { custom?: number } } export const Custom = defineComponent({ props: { bar: String, baz: { type: Number, required: true } }, data: () => ({ counter: 0 }), test(n) { expectType(n) }, methods: { aMethod() { // @ts-expect-error expectError(this.notExisting) this.counter++ this.state = 'running' // @ts-expect-error expectError((this.state = 'not valid')) } } }) expectType() expectType() expectType() expectType() // @ts-expect-error expectType() // @ts-expect-error expectError() // @ts-expect-error expectError() // @ts-expect-error expectError() // @ts-expect-error expectError()