Nuxt/examples/with-composables/composables/use-foo.ts
Anthony Fu 550a9f2e12
feat: auto-import for composables (#1176)
Co-authored-by: Pooya Parsa <pyapar@gmail.com>
2021-10-20 11:47:18 +02:00

24 lines
291 B
TypeScript

import { useState } from '#app'
export function useA () {
return 'a'
}
function useB () {
return 'b'
}
function _useC () {
return 'c'
}
export const useD = () => {
return 'd'
}
export { useB, _useC as useC }
export default function () {
return useState('foo', () => 'bar')
}