import { nextTick } from 'vue' import { describe, expectType } from './utils' describe('nextTick', async () => { expectType>(nextTick()) expectType>(nextTick(() => 'foo')) expectType>(nextTick(() => Promise.resolve('foo'))) expectType>( nextTick(() => Promise.resolve(Promise.resolve('foo'))), ) expectType(await nextTick()) expectType(await nextTick(() => 'foo')) expectType(await nextTick(() => Promise.resolve('foo'))) expectType( await nextTick(() => Promise.resolve(Promise.resolve('foo'))), ) nextTick().then(value => { expectType(value) }) nextTick(() => 'foo').then(value => { expectType(value) }) nextTick(() => Promise.resolve('foo')).then(value => { expectType(value) }) nextTick(() => Promise.resolve(Promise.resolve('foo'))).then(value => { expectType(value) }) })