Skip to content

types(slots): Add typed slots #2693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 12 commits into from
Prev Previous commit
remove lingering code
  • Loading branch information
pikax committed Feb 21, 2023
commit e1eafb618e04a038b3b88be8f565222a988b20da
2 changes: 0 additions & 2 deletions packages/compiler-sfc/__tests__/compileScript.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ const myEmit = defineEmits(['foo', 'bar'])
expect(content).toMatch(`emits: ['a'],`)
})

// ss

test('defineSlots()', () => {
const { content, bindings } = compile(`
<script setup>
Expand Down
14 changes: 0 additions & 14 deletions packages/runtime-core/src/apiDefineComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,17 +223,3 @@ export function defineComponent<
export function defineComponent(options: unknown) {
return isFunction(options) ? { setup: options, name: options.name } : options
}

defineComponent({
slots: null as unknown as {
item: {
value: string
}
},

setup(_, { slots }) {
slots.item?.({
value: '1'
})
}
})