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

5 lines
133 B
TypeScript
Raw Permalink Normal View History

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