Nuxt/test/fixtures/basic/server/api/union.ts

5 lines
132 B
TypeScript
Raw Permalink Normal View History

export default defineEventHandler(() => ({
type: 'a',
foo: 'bar'
}) as { type: 'a', foo: string } | { type: 'b', baz: string })